note 36624 deleted from function.header by victor
| From: | victor@php.net | Date: | Sat, 19 Jun 2004 15:35:34 +0000 |
| Subject: | note 36624 deleted from function.header by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71360@lists.php.net to get a copy of this message | ||
Note Submitter: pmorgan@ukds.net
----
Here's the code I finally used to stream a html document to a ms word. Inclusion of the cache
code is what made it work (thanks to Chrs Hayes on news.php.general)
header("Expires: Mon, 26 Jul 1997 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("Content-type: application/msword");
header('Content-Disposition: attachment; filename="my.doc";');