I have been trying code similar to:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=".basename($filename).";");
header("Content-Length:". filesize($filename));
readfile("$filename");
exit();
I am using Opra and IE for testing. They both appear to act exactly the same. They will download an EXE file, and the downloaded file will have the same file size as the original, but there is still a difference in the file after downloading. The downloaded file does not retain the icon that the original EXE has, and the EXE will not execute properly. Does anyone have any idea why ZIP works fine, but EXE does not?
Some other specifics are:
1)The filesize attribute does not work due to my file being located on an ftp? (I'll have to pass it manually)
2)I have tried the octet setting already, no difference.
I am very confused at this point.
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=".basename($filename).";");
header("Content-Length:". filesize($filename));
readfile("$filename");
exit();
I am using Opra and IE for testing. They both appear to act exactly the same. They will download an EXE file, and the downloaded file will have the same file size as the original, but there is still a difference in the file after downloading. The downloaded file does not retain the icon that the original EXE has, and the EXE will not execute properly. Does anyone have any idea why ZIP works fine, but EXE does not?
Some other specifics are:
1)The filesize attribute does not work due to my file being located on an ftp? (I'll have to pass it manually)
2)I have tried the octet setting already, no difference.
I am very confused at this point.