At 18:16 15-10-03, you wrote:
I'm trying to send the following header to force ms-word to open a html document

header("Content-type: application/msword");

header('Content-Disposition: attachment; filename="invoice.doc"');

it works in Mozilla but NOT in IE..

any ideas as its driving me crazy..
I collected various headers to send a csv file to be opened by excel and though it looks redundant, it seems to work.
All the caching supression seems to be important.
--------------------------------------------------------
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: text/csv");
header('Content-Disposition: inline; filename="Aanmeldingen_SENSE_symposium_2003.csv"');
echo $string_csv;


----------------------------and----------------------------
In a previous version I also had to supress the word ;atachment; for the content disposition i think, for MSIE 5.5. Is that your MSIE version? I do not use it anymore. Maybe a google search helps to explain this better than I can.
if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5.5")) {$att = "";} else {$att = " attachment;";}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to