Downloading Files
Moderator: General Moderators
Downloading Files
I have set up a download page for a user to download a file from my website, but it has stopped working properly (I think because of a new version of IE). Right now I am using application/force-download to download a Dreamweaver Extension (application type: application/x-mmxp). Is there any other way that I could do this to make it a bit more reliable? Thanks
Re: Downloading Files
Is the file displaying inline (ie. in your browser)? Or are you getting nothing happening?Clukey wrote:I have set up a download page for a user to download a file from my website, but it has stopped working properly (I think because of a new version of IE). Right now I am using application/force-download to download a Dreamweaver Extension (application type: application/x-mmxp). Is there any other way that I could do this to make it a bit more reliable? Thanks
Re: Downloading Files
It is displaying inlinearkady wrote: Is the file displaying inline (ie. in your browser)? Or are you getting nothing happening?
I've found that the following works fine for myself in both ie & firefox
Hopefully this comes in handy for you
Code: Select all
header("Pragma: public");
header("Expires: " . gmdate('D, d M Y H:i:s') . " GMT");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Length: " . $my_filesize);
header("Content-Type: application/" . $file_type[$stated_file_type]);
header("Content-Disposition: attachment; filename='".$filename."'");
header("Content-Transfer-Encoding: binary"); // assuming its a binary file of course