WebSite X5Help Center

 
Alejandro A.
Alejandro A.
User

Formulario email con archivos  es

Author: Alejandro A.
Visited 1859, Followers 2, Shared 0  

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..

Posted on the
2 ANSWERS
Alejandro A.
Alejandro A.
User
Author

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"]."/");
    }


?>

Read more
Posted on the from 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?

Read more
Posted on the from Michele C.