What I tried was the following:
header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=\"textfile.txt\""); echo $output;
This works properly on Mozilla, however the following problems occur in IE:
IE version 5.50.4522.1800 -> 2 dialog boxes appear, and while "save as" appears to work properly, "open" doesn't work at all
IE version 5.50.4134.0600 -> Text appears in the browser window, no dialog appears
I'm not sure if the service pack is installed. Is there any way to do this besides the Content-Disposition header? Perhaps by sending a location header without actually redirecting?
Thanks, Grant
CPT John W. Holmes wrote:
From: "Grant Rutherford" <[EMAIL PROTECTED]>
I have tried many variations of the header command, but no luck so far.
It seems to work okay on Mozilla browsers but not IE.
Okay, what have you actually tried? What are you using now? Have you read through _all_ of the comments on the manual page for header?
All you need to do is send a header() that signifies the following data is an attachment so the save/open dialog will popup. You can use the same file, just conditionally send the appropriate headers.
---John Holmes...
-- Grant Rutherford Iders Incorporated 600A Clifton Street Winnipeg, MB R3G 2X6 http://www.iders.ca tel: 204-779-5400 ext 36 fax: 204-779-5444 ================================ Iders Incorporated: Confidential ================================ Note: This message is intended solely for the use of the designated recipient(s) and their appointed delegates, and may contain confidential information. Any unauthorized disclosure, copying or distribution of its contents is strictly prohibited. If you have received this message in error, please destroy it and advise the sender immediately by phone, Email or facsimile.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php