aviv00 Posted December 9, 2008 Posted December 9, 2008 (edited) hey allhow i could make my website to be able to download from it files that are different or not common like .txtvia web browsing i get the file worng just 1.6ki open it with notepad and saw same information of the http connection thx in advancededitmoder pls move to Server - Side Help (IIS, Apache, etc.) sub-fourm thx Edited December 9, 2008 by aviv00
ravs Posted February 5, 2009 Posted February 5, 2009 once your file is uploaded to the server you can set header like... header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($file)); here $file is full path with file name.thanx,ravs
jcarle Posted February 12, 2009 Posted February 12, 2009 I would suggest using the correct MIME Type instead of application/force-download. Different browsers may choose to interpret this differently.
cluberti Posted February 12, 2009 Posted February 12, 2009 I don't know about IE8, but I know IE6 and IE7 have problems with that MIME type, for instance.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now