Re: DESCARGAR ARCHIVO
| From: | Pablo E. Siciliano | Date: | Tue, 12 Aug 2003 17:27:04 +0000 |
| Subject: | Re: DESCARGAR ARCHIVO | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-39302@lists.php.net to get a copy of this message | ||
Cesar:
Ya te contestamos en el hilo anterior!! (Uno que decía descargador)
Y aunque así no fuera, es una falta seria de etiqueta copiar exactamente lo
mismo con otro asunto.
Basicamente te falta :
$fp = fopen($nombre_fich,"rb");
print fread($fp,filesize($nombre_fich));
Como te decía en mi mail anterior, primero deberías validar $nombre_fich.
Saludos.
----- Original Message -----
From: "cesar nuñez" <cesar_nk@hotmail.com>
To: <lista@phpes.com>
Sent: Tuesday, August 12, 2003 1:35 PM
Subject: [PHP-ES] DESCARGAR ARCHIVO
> Saludos a todos .
>
>
> Quisiera bajar un archivo xls del servidor y guardarlo en una ruta
> especifica .....
> Tengo el sgte. código que me guarda el archivo en una ruta pero sin
> contenido ..... Por favor que le falta a mi código ????
>
> heFile = basename($ElFichero);
>
> header( "Content-Type: application/octet-stream");
> header( "Content-Length: ".filesize($ElFichero));
> header ("Content-Disposition: attachment; filename=".$TheFile."\n\n");
> header ("Content-Disposition: attachment; filename=".$TheFile."\n\n");
> header ("Connection: close");
>
> }
>
> Descargar("c:\aa\ejemplo.xls");
>
>
> Muchas Gracias
>
> _________________________________________________________________
> ¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/03