note 14095 added to function.header.php
| From: | lorangj at pt dot lu | Date: | Tue, 17 Jul 2001 10:00:37 +0000 |
| Subject: | note 14095 added to function.header.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15477@lists.php.net to get a copy of this message | ||
Hello. This is my download script. It works fine, but it does not work with PDF Files, at least in
IE 5. It opens me a new windows telling me to download some activeX driver to view the file. (I have
Acrobat Reader installed, be sure). So, if anyone knows something about it... Thankx
$doc=get_doc_info($DocId);
$name=$doc["file_name"];
$file=$data_dir."/".$doc["path"];
if(file_exists($file)){
header("Content-Type: application/download\n");
header("Content-Disposition: filename=$name");
$fn=fopen($file , "r");
fpassthru($fn);
}
else{DIE("No such file"); }
I already tried everything, with "attachment" or "atachment", with
"binary" header.
http://www.php.net/manual/en/function.header.php