I'm directing client via a link to a download page for pdf documents.

This code works on mozilla + firebird but in IE however it pops up with a open/save dialog - with the filetype missing and then an error when open/save pressed saying "cannot find the site".

As you can see below I've tried all sorts of variations but still the same error

can someone help me out !!!

tia
Pete
---------------------------------------------------

$dir = '/www/cgi-bin/docu/pdfs/';
$file = $dir.$row['path']."/".$row['file_name'];
$file_name = "file_".trim($_GET['n']).".pdf";
        

//force download dialog
header("Pragma: no-cache");
//header("Content-type: application/octet-stream\n");
header("Content-type: application/pdf\n");
//header("Content-type: application/x-download");

//header("Content-disposition: inline; filename=$file_name\n");
header("Content-disposition: attachment;filename=$file_name\n");

header("Content-transfer-encoding: binary\n");
//header("Accept-Ranges: bytes");
header("Content-length: " . filesize($file) . "\n");
                
        
//send file contents
$fp=fopen($file, "r");
fpassthru($fp);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to