Re: Descarga de Archivos SOLUCIONADO !!!!!!!!!!!!!!!

From: Date: Wed, 20 Mar 2002 14:18:44 +0000
Subject: Re: Descarga de Archivos SOLUCIONADO !!!!!!!!!!!!!!!
References: 1 2 3  Groups: php.general.es 
Request: Send a blank email to general-es+get-20587@lists.php.net to get a copy of this message
el codigo final quedo asi $url = $path."/".$attach; header ("Content-Type: application/octet-stream"); header ("Content-Length: ".filesize($url)); header ("Content-Disposition: attachment; filename=$attach"); readfile($url); funciono perfectamente y el problema que habia era que tenia un session_start al comienzo lo saque y funciono perfectamente, ahora realmente me gustaria saber porque la sesion puede interferir con esto, pero eso ya es un lujo por el momento ----- Original Message ----- From: "Walter D. Funk" <walter@netcomproject.com> To: <lista@phpes.com> Sent: Wednesday, March 20, 2002 10:54 AM Subject: Re: [PHP-ES] Descarga de Archivos > > ----- Original Message ----- > From: "Angel Fenoy" <afenoy@wol.es> > To: <lista@phpes.com> > Sent: Tuesday, March 19, 2002 11:08 PM > Subject: Re: [PHP-ES] Descarga de Archivos > > > > Dimarts 19 Març 2002 19:34, Walter D. Funk dixit: > > > > > Ya se que del tema se ha estado hablando, incluso, yo mismo propuse una > > > solucion, pero hace horas que me encuentro con un problema que les > detallo > > > a continuacion > > > > > Si $url contiene la ruta completa, readfile($url) y filesize($url) serían > > correctos, pero "Content-Disposition: attachment; filename=$url" no, > filename > > deberia contener únicamente el nombre del fichero, sin ruta. > > > > > $url = $path."/".$attach; > donde $path es la ruta y $attach contiene el nombre con el que esta gurdado > el documento por ejemplo att123.doc > > header ("Content-Type: application/octet-stream"); > header ("Content-Length: ".filesize($url)); > header ("Content-Disposition: attachment; filename=$attach"); > readfile($url); > > tambien probe con > header ("Content-Disposition: attachment; filename=".$attach); > > pero sigue dando el mismo error > :-( > > > > > --------------------------------------------------------------------- > 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 > >

« previous php.general.es (#20587) next »