From: "Luis Lebron" <[EMAIL PROTECTED]>

> 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...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to