Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/12/2004, 12:25
Neoxs
 
Fecha de Ingreso: marzo-2003
Ubicación: Chivilcoy
Mensajes: 142
Antigüedad: 23 años, 7 meses
Puntos: 0
Problema para descargar archivos

Hola amigos del Foro,
Los molesto porque tengo el siguiente problema: estoy tratando de armar una página php desde la que se pueda descargar un archivo a la PC del cliente. Para ello uso el siguiente coódigo:
<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(@ižhª®,«C#´tm·BÜ|o3Ÿph �ȤR(` b ãR™x6°Ýt cJ CÉA @€EÀ°p$Ôl÷Qf8Jðv·x¢Q1U ‡‰‹eO;ŒŠ>U)  %n" oU#o_�£¡<–_'©O´Ž&U·%N´·¹G�&†š Ç¢ª`Ê� ÀÀD³:}: ¶¸Ì� ªÒÓ‰V$/´ææ èN¿ÌGÇRÇ<†±>ø[¦ 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 opción para descargarlo.
Si alguien me puede dar una mano se lo voy a agradecer
Saludos
__________________
Leandro Mandarano
Cyper Developments
http://www.cyper.com.ar