Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/09/2003, 21:06
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 4 meses
Puntos: 129
Jeje ..josemi .. se te coló un "application" de más ..

Bueno, aquí tienes un ejemplo .. avisar que IE 5.5 dá muchos problemas (por un bug del mismo) para usar ciertas cabeceras HTTP ..

Código PHP:
<?
$file
="nose.pdf";
$filename=basename($file);
$size=filesize($file);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$filename\""); 
header("Content-Length: ".$size);
header("Content-Transfer-Encoding: binary");
readfile($file);
?>
Y otra más ..
Código PHP:
<?
$file
="nose.pdf";
$filename=basename($file);
$size=filesize($file);
if(
stristr($HTTP_SERVER_VARS["HTTP_USER_AGENT"],"Gecko")) {
   
header("Content-type: application/x-zip-compressed\n");
} else {
   
header("Content-type: application/zip");
}
header("Content-transfer-encoding: binary\n"); 
$head="Content-Disposition: attachment; filename=".$filename."\n";
header($head);
header("Content-Length: ".$size);
readfile($file);
?>
En esta última se chequea el navegador (cliente) que se usa para aplicar la cabecera HTTP más adecuada ..

Un saludo,
__________________
Por motivos personales ya no puedo estar con Uds. Fue grato haber compartido todos estos años. Igualmente los seguiré leyendo.