WebSite X5Help Center

 
Alejandro A.
Alejandro A.
User

Formulario email con archivos  es

Auteur : Alejandro A.
Visité 1861, Followers 2, Partagé 0  
Mots-clés :: correo,email,formulario,mail

Hola: ¿Porque el formulario email con archivos adjuntos no es compatible con todos los servidores de hosting? No funcciona adjuntar archivos desde el formulario. He probado todas las opciones de post, get, low, etc..

Posté le
2 RéPONSES
Alejandro A.
Alejandro A.
User
Auteur

Desde el hosting me han dado este codigo para que funccione. Como se puede implementar en website x5? Gracias,

<?php
    $request_method = $_SERVER["REQUEST_METHOD"];
    if($request_method == "GET"){
      $query_vars = $_GET;
    } elseif ($request_method == "POST"){
      $query_vars = $_POST;
    }
    reset($query_vars);
    $t = date("U");

    $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
    $fp = fopen($file,"w");
    while (list ($key, $val) = each ($query_vars)) {
     fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
     fputs($fp,"$val\n");
     fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
     if ($key == "redirect") { $landing_page = $val;}
    }
    fclose($fp);
    if ($landing_page != ""){
    header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    } else {
    header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    }


?>

Lire plus
Posté le de Alejandro A.
Incomedia
Michele C.
Incomedia

Hello,
the attachment feature should correctly work if your server supports PHP5, what error did you get?

***** Google Translation:

Hola,
la función de adjunto correctamente debería funcionar si su servidor soporta PHP5, qué error te metiste?

Lire plus
Posté le de Michele C.