I would like a user to request the page "view_file.php", and I would like php to generate an arbitrary file and send it to the user. This is all okay, however, I would like to rename the sent page so that the browser doesn't open it in a window as an html file but instead brings up the "open/save" dialog box. I would also like it to do this without creating any new files on my server.
For instance, this is how I would like it to work:
Client requests 'view_files.php',
view_files.php generates the output and sends it to the client as the file 'result031017.txt' with header "Content-Type: text/plain",
The client is presented with an open/save dialog with 'result031017.txt' as the default file name
Please note that the file name itself will be dynamic and part of the output.
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.
Can anyone offer any advice, or tell me if this is not going to be possible?
Thanks, Grant
-- 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