walnoot Posted February 12, 2008 Share Posted February 12, 2008 Hi, Is there a way to set that the file should be download directly either than viewed in the browser? I would like to use this for images and txt files. I really don't know if this is possible in php (When googling i came apon this: header('Pragma: no-cache'); , but i don't know how to use it.... and it might not be that). Thx! Quote Link to comment https://forums.phpfreaks.com/topic/90736-download-file-not-view-it-in-browser/ Share on other sites More sharing options...
trq Posted February 12, 2008 Share Posted February 12, 2008 Check out our FAQ board. There is a 'force download' example in there. Quote Link to comment https://forums.phpfreaks.com/topic/90736-download-file-not-view-it-in-browser/#findComment-465082 Share on other sites More sharing options...
walnoot Posted February 12, 2008 Author Share Posted February 12, 2008 THX! Quote Link to comment https://forums.phpfreaks.com/topic/90736-download-file-not-view-it-in-browser/#findComment-465120 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.