
13/12/2004, 12:25
|
| | Fecha de Ingreso: marzo-2003 Ubicacin: Chivilcoy
Mensajes: 142
Antigedad: 22 aos Puntos: 0 | |
Problema para descargar archivos Hola amigos del Foro,
Los molesto porque tengo el siguiente problema: estoy tratando de armar una pgina php desde la que se pueda descargar un archivo a la PC del cliente. Para ello uso el siguiente codigo: <body>
<?
$file = 'cerrar.gif';
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
?>
</body>
El tema es que esto me devuelve la siguiente lista de errores: Warning: Cannot modify header information - headers already sent by (output ftp.php:9) in ftp.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at ftp.php:9) in ftp.php on line 12
Warning: Cannot modify header information - headers already sent by (output started at ftp.php:9) in ftp.php on line 13
Warning: Cannot modify header information - headers already sent by (output started at ftp.php:9) in ftp.php on line 14
GIF89a<̀0`Ӑ@P ߰p !,<P(@ih,C#tmB|o3ph ȤR(` b Rx6t cJ CA @Ep$lQf8Jv·xQ1U eO;>U) %n" oU#o_<_'O&U%NG& Ǣ`ʝ D:}: ́ ӉV$/ NGR<>[ H@&0ɺ;
He probado cambiando el nombre y el tipo de archivo a descargar, pero siempre hace lo mismo, me muestra la estructura del mismo y no me da ninguna opcin para descargarlo.
Si alguien me puede dar una mano se lo voy a agradecer
Saludos
__________________ Leandro Mandarano
Cyper Developments
http://www.cyper.com.ar |