RE: [PHP] IE5.5 Header Issues
| From: | Blaster | Date: | Wed, 03 Jan 2001 14:30:32 +0000 |
| Subject: | RE: [PHP] IE5.5 Header Issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32498@lists.php.net to get a copy of this message | ||
The line:
header("Content-Disposition: attachment; filename=$filename");
is to prompt the browser to download the file... So if you don't want the
browser to prompt for a file download, don't put it
-----Original Message-----
From: Toby Miller [mailto:tmiller@creativegeneration.com]
Sent: Wednesday, January 03, 2001 09:19
To: php-general@lists.php.net
Subject: [PHP] IE5.5 Header Issues
I am using the following code:
<?php
if (isset($source) && isset($filename)) {
if (filetype($source) == "text/plain") header("Content-Type:
text/plain");
else header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Length: ".filesize($source));
readfile($source);
exit();
}
?>
This does not work properly in IE 5.5. I don't have another version of IE to
test this with. I get a save dialog box for the file "index.html" every
time. This is the same for all file types. Is this just a bug in IE 5.5 or
is this the same in other versions of IE? If anyone knows the workaround I
would love to see it.
Thanks,
Toby