Re: * COMO SERVIR ARCHIVOS de cualqiuier tipo? *

From: Date: Wed, 30 Jan 2002 14:17:56 +0000
Subject: Re: * COMO SERVIR ARCHIVOS de cualqiuier tipo? *
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-18626@lists.php.net to get a copy of this message
hace unos dias se contesto eso. aqui esta: PD. tambien se puede hacer modificando en la configuracion de apache el tipo de archivo asociado a esa extension. > Hola Cristina: > > ¿Por qué, no pruebas a hacer una fichero download.php? > > En vez de lincar directamente al archivo que quieres que bajen > construyes un link del tipo '<a > href="download.php?file=el_archivo_para_bajar.zip">Download > el_archivo_para_bajar.zip</a>'. > > Este fichero download.php sería algo como esto: > > <? > /* > aquí irán tus rutinas de control para restringir el acceso > */ > if ($lo_puede_bajar) { > header( "Content-type: application/savingfile" ); > header( "Content-Disposition: attachment; filename=$file" ); > header( "Content-Description: SQL document." ); > readfile("$file"); > } > else { > echo "No puedes bajarte este archivo :-DDD"; > } > > ?> > > Espero que te sirve de ayuda. > ----- Original Message ----- From: "Rigoberto Sandoval" <ogir@gd.com.mx> To: "PHP-ES" <lista@phpes.com> Sent: Tuesday, January 29, 2002 9:06 PM Subject: [PHP-ES] * COMO SERVIR ARCHIVOS de cualqiuier tipo? *

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