Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/12/2006, 12:00
Avatar de .php
.php
 
Fecha de Ingreso: julio-2006
Mensajes: 481
Antigüedad: 18 años, 7 meses
Puntos: 5
Re: Descarga forzada de archivos desde servidor.

o prueba con de esta otra manera
Código PHP:
$carpeta="./schemes/";  
if(
file_exists($carpeta.basename($_GET['file'])))  
{  
    
$ruta $_GET["file"];              
    
$file=$carpeta.$_GET["file"];  
    
header ("Content-Disposition: attachment; filename=".$nombre_del_archivo."\n\n");  
    
header ("Content-Type: application/octet-stream");  
    
header ("Content-Length: ".filesize($file));  
    
readfile($file);  
    exit;