Re: Bajar ficheros del Servidor

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Bajar ficheros del Servidor
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-34488@lists.php.net to get a copy of this message
Hola: He probado lo que me envío JL, pero como que no me termina de funcionar, es decir he llegado hasta que me reconozca la aplicación que es y el nombre del archivo, etc, pero cuando voy a ver lo que me ha dejado me da error y en el fichero me imprime el Warning del read file He de decir que tengo PHP 4.3.0 sobre IIS. Os envío el código por si me podeís ayudar <? if(!empty($ficherogz)) { header("Content-Type: application/x-msdownload\n"); header("Content-Disposition: attachment; filename=".basename($f).";\n"); // For Other browsers //@readfile("docs/".$f); //header("Content-Type: application/zip"); //header("Content-Type: application/octet-stream"); header("Content-Disposition: filename=$ficherogz;"); //header("Content-Length: ".filesize("$path/$file")); @readfile($ficherogz); echo "<CENTER><A HREF='$PHP_SELF'>Volver</A></CENTER><p>"; $ficherogz=""; exit; } ?> <html> <head> <title>Bajar ficheros del Servidor</title> <body> <H1>Servir ficheros comprimidos </H1> <FORM ACTION="<? echo "$PHP_SELF" ?>" METHOD="POST" > <? echo "Seleciona el fichero<SELECT NAME='ficherogz'>"; $f = opendir("C:\Documents and Settings\PRONARED\Escritorio\PHP\PHPZIP"); $fn = readdir($f); while ($fn) { $fn = readdir($f); //if (ereg("zip",$fn)) echo "<OPTION VALUE='$fn' > $fn\n"; } ?> </SELECT> <INPUT TYPE="SUBMIT" NANE=boton VALUE="descargar"> </FORM> <p> <CENTER><A HREF="<? echo $PHP_SELF ?>">Volver</A></CENTER><p> </body> </html> Gracias. Antonio José Martínez Zaragoza Pronared, S.L. e-mail: azaragoza@pronared.es

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