Cómo descargo un archivo en PHP?
Ya que tengo este código:
Cita:
El problema es que me salen un poco de garabatos y dice algo como:$file = file(getcwd()."/proyecto/".$_POST["archivo"]);
$file2 = implode("", $file);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$file");
header("Content-Length: ".strlen($file2)."\n\n");
echo $file2;
$file2 = implode("", $file);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$file");
header("Content-Length: ".strlen($file2)."\n\n");
echo $file2;
Warning: Cannot modify headers information - headers already sent by (output started by /../../../../descargar.php in /../../../../descargar2.php on line 65.
Si alguien me pudiera ayudar, estaría MUY AGRADECIDO!!
Saludos..
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)