Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/03/2007, 16:57
IngProd
 
Fecha de Ingreso: marzo-2007
Mensajes: 78
Antigüedad: 18 años
Puntos: 0
Re: Descargar archivos

Yo lo hago así... igual te vale. Suerte!

Código PHP:
<?   
   $nombre 
$_GET['nombre'];
   
$path $_GET['path'];
   
   if ( 
file_exists($path $nombre) ){
      
header("Content-type: application/octet-stream");
      
header("Content-Disposition: attachment; filename=$nombre");
      
header("Pragma: no-cache");
      
header("Expires: 0");
      
      if (
$file fopen($path $nombre,"r")){
         while (!
feof($file)){
            
$aux fgets($file,4096);
            echo 
$aux;
         }
         
fclose($file);
      }
   }
?>