Ver Mensaje Individual
  #11 (permalink)  
Antiguo 12/10/2006, 07:24
Avatar de .php
.php
 
Fecha de Ingreso: julio-2006
Mensajes: 481
Antigüedad: 17 años, 9 meses
Puntos: 5
hace falta un detalle
me di cuenta despues.

mira este codigo
Código PHP:
    if ($aTmp[0]=="descargas"){
        
$enlace $_SESSION["path"]."$aTmp[1]";
        
header ("Content-Disposition: attachment; filename=".$aTmp[1]."\n\n"); 
        
header ("Content-Type: application/octet-stream"); 
        
header ("Content-Length: ".filesize($enlace)); 
        
readfile($enlace); 
    } 
agregale un exit();
para que no se siga ejecutando, sino cuando baje un documento te adjuntara el html
de la pagina
Código PHP:
    if ($aTmp[0]=="descargas"){
        
$enlace $_SESSION["path"]."$aTmp[1]";
        
header ("Content-Disposition: attachment; filename=".$aTmp[1]."\n\n"); 
        
header ("Content-Type: application/octet-stream"); 
        
header ("Content-Length: ".filesize($enlace)); 
        
readfile($enlace); 
        exit;
    } 

PD: YA ESTABA AGREGADO PENSE QUE NO LO HABIA HECHO :D, ES UNA MODIFICACION QUE HICE HACE POCO