Hi all, I am trying the following code:
My problem is that this works fine for zip files, but when I use an .exe file, it appears to download the same amount of bytes using ws-ftp; however, it's proper icon is not visible and it will not execute properly.
I would think this to be due to one of the settings? Any suggestions?
I really haven't found a good, easy to use reference for the header statements. If someone can point me in a good direction, thanx.
Code:
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-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; Filename=".basename($filename).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
My problem is that this works fine for zip files, but when I use an .exe file, it appears to download the same amount of bytes using ws-ftp; however, it's proper icon is not visible and it will not execute properly.
I would think this to be due to one of the settings? Any suggestions?
I really haven't found a good, easy to use reference for the header statements. If someone can point me in a good direction, thanx.