[PHP] download a textfile


OSNN Veteran Addict
When you upload a text file on the forum and download it again, my browser comes up with a download window, asking me where to download this file etc. But how do you do that in PHP? Or is there another way then PHP to do that? Javascript maybe?


OSNN Veteran Addict
Thanks SPeedY_B. It's pretty much the same answer as I found myself :p
header('Content-type: plain/text');
header('Content-Disposition: attachment; filename="bleh.txt"');

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member