note 37101 added to function.header

From: Date: Mon, 03 Nov 2003 12:30:01 +0000
Subject: note 37101 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-59681@lists.php.net to get a copy of this message
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']; ?> ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37101 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37101&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37101&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59681) next »