Page 1 of 1

Downloading a created txt file.....!

Posted: Sun Feb 09, 2003 5:43 am
by Skywalker
Is it posible that the created text file that is generated by an web forum you can download it, insted of showing it in the browser when you klick on it?

If this is posible how can I do this and wher can I find some info about this subtject?




Greathings Skywalker

Posted: Sun Feb 09, 2003 9:24 am
by volka
can be done with a Content-Disposition header.
Take a look at the header() manual page

Posted: Sun Feb 09, 2003 2:15 pm
by Bitmaster
Be careful with concurrency issues...Think about what happens when two users request the same functionality and the contents of the files they require is different...So i would not recommend actually generating a physical text file on the server for download, just output the contents of the file from a PHP script with the appropriate headers as suggested above, generated dynamically upon each request.

Posted: Mon Feb 10, 2003 12:31 pm
by Skywalker
Ok thx for the information ;)