Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/10/2008, 10:32
Avatar de Cebedeo
Cebedeo
 
Fecha de Ingreso: abril-2007
Mensajes: 3
Antigüedad: 17 años
Puntos: 0
Respuesta: Abrir archivo .pdf guardado en cierta ubicacion

Eso es porque tienes que poner los headers de PHP antes de que ningún código haya sido mandado, es decir, antes de iniciar el html. Quedaría algo así, si sigues buscando la solución:




<?

$filename=$_GET["filename"];
$pdf ='C:\\fax\\'.$filename;
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.$pdf.'"');
readfile($pdf);

?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Fax Datei</title>
</head>
<body>

</body>
</html>


O incluso puedes directamente omitir el código html. El PHP en teoría hace todo lo que necesitas. Ya dirás qué tal fue.