File through script
| From: | Stefan Scherf | Date: | Sun, 06 Aug 2000 17:42:10 +0000 |
| Subject: | File through script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10346@lists.php.net to get a copy of this message | ||
hi,
i have the following problem with IE5.0, IE5.5, PHP4, Apache, Linux:
the user should download ("save as") the file /home/test/info.txt.
the user should not see the file in his browser.
download-file:
/home/test/info.txt
(it's a "real" text-file)
link for the download:
<a
href="download.html?download_file=info.txt&download_path=/home/test">downloa
d</a>
script that handles the download (download.html):
<?
header ("Content-Type: application/octet-stream");
header ("Content-disposition: attachment; filename=".$download_file"");
readfile($download_path."/".$download_file);
?>
problemes:
- IE5.0: after the "save as"-window appeared, the browser is still active
(looking for the download.html-file)
- IE5.5: the file info.txt is always shown in the browser-window
thanks
stefan
PS: NetscapeNavigator 4.08: everything works fine