note 36624 added to function.header

From: Date: Thu, 16 Oct 2003 16:04:32 +0000
Subject: note 36624 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-58703@lists.php.net to get a copy of this message
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";'); ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36624 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36624&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36624&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58703) next »