Re: IE download problem
| From: | CPT John W. Holmes | Date: | Wed, 26 Nov 2003 16:03:19 +0000 |
| Subject: | Re: IE download problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171088@lists.php.net to get a copy of this message | ||
From: "Luis Lebron" <llebron@sigmatech.com>
> I am working on a script to force downloading a file. The script works
fine
> with NS (4.8 and 7) but does not work correctly with IE 6.0
> I have looked at examples on php.net and have googled for a solution, but
> still can't find a solution. I think IE wants to download the script
instead
> of the file.
How does it "not work"??
[snip]
> Header("Content-Disposition: filename=\"".$filename."\"\n");
Why are you adding a newline to this header?
> Header("Content-Transfer-Encoding: binary");
> $fp = fopen($filePath,"rb");
> fpassthru($fp);
readfile() would be better to use here...
> The funny thing is that I have a similar script that I use to download an
> sql file and it works correctly.
It works on IE? If they are "similar", what's different??
---John Holmes...