Strange download script problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a php script which generates a zip file that contains an ASCII
text file. The script then prompts the user to save/open the zip file.
The script is on a server that is behind an Apache proxy server. Using
Firefox, the download works fine and everything goes as intended.
However, IE7 tries to download the php script instead of the zip file,
resulting in an access error.

Below are the pertinent portions of the script.

Any help is greatly appreciated.



$file_name = "/tmp/";

$size = filesize($file_name);

//Set headers
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment;");
header("Content-Length: $size");
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: binary");

//Read the file from disk

Re: Strange download script problem

Raffi wrote:
Quoted text here. Click to load it


Re: Strange download script problem

This is similar to your case:

Quoted text here. Click to load it

Site Timeline