note 39211 added to function.header
| From: | ro_at_de_bug at rn2 dot php dot net | Date: | Tue, 20 Jan 2004 21:37:14 +0000 |
| Subject: | note 39211 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63906@lists.php.net to get a copy of this message | ||
OK, I'm at my wits' ends with this problem. I have a download page that sends the correct
headers to the browser and downloads a blob file from a MySQL table. Everything works
great on Mozilla, Netscape, and IE until I try to download a Zip file. What's puzzling is that
the SAME EXACT file works in Mozilla/Netscape but DOES NOT work on IE. Tha is, IE
somehow manages to corrupt the file when it moves it from the temp directory,
rendering the downloaded file obsolete and useless. Here is the code for the headers
I send:
<?php
Header ("Pragma: public");
Header ('Expires: '.gmdate("D, d M Y H:i:s \G\M\T", time() + 3600));
Header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
Header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); # HTTP/1.1
Header ("Cache-Control: post-check=0, pre-check=0", false);
Header ("Cache-control: private");
Header ("Content-Type: $datatype" );
Header ("Content-Length: " . $FileObj->size );
Header ("Content-Disposition: attachment; filename=\"$filename\"");
?>]
So any suggestions would be GREATLY appreciated!
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39211
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39211&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39211&report=yes
Search -- http://master.php.net/manage/user-notes.php