note 37101 deleted from function.header by kennyt
| From: | kennyt@php.net | Date: | Sun, 18 Jul 2004 18:07:33 +0000 |
| Subject: | note 37101 deleted from function.header by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73562@lists.php.net to get a copy of this message | ||
Note Submitter: Dr. Hasenbein
----
I had problems getting IE 6 to open [or to 'save as'] a BLOB'ed Word-document even
with all those nice examples below. This line saved my day: header("Cache-control:
private");
<?
header("Expires: Mon, 26 Jul 2001 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
header("Cache-control: private"); // <= it's magical!!
header("Content-type: ".$row['mime']); //
'application/msword' or 'application/octet-stream'
header("Content-Disposition: attachment; filename=".$row['orgname']);
echo $row['file'];
?>