Forcing renaming of download file (want output from a php file being saved
as some particular file by browser)

Hello
I have a php file abc.php which outputs some data (which it collects from a
database somhow). Now I want to force a download/open dialogue box and to
give a name to the file in which the browser will store that date.
Forcing a download is easy, but how can I tell the browser to name that file
to something particular, say data1.txt
Is there a header for that?
One way around would be to store the data in a temporary file accessible to
that user and then redirect the browser to that file. But there might be a
better and more secure way.
Regards
Pankaj

----------------------------------------------------------------------------
-------------------------------------------
Pankaj Gupta
Senior Undergraduate,
Deptt. of Computer Science and Engineering,
Indian Institute of Technology, Kanpur.
http://www.waytobiz.com/pankajresume1.php3
----------------------------------------------------------------------------
-------------------------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to