From: "Phpu" <[EMAIL PROTECTED]>

> header( "Content-type: application/force-download" );
> if ((is_integer (strpos($user_agent, "msie"))) && (is_integer
(strpos($user_agent, "win")))) {
>   header( "Content-Disposition: filename=".$filename);
> } else {
>   header( "Content-Disposition: attachment; filename=".$filename);
> }
> header( "Content-Description: File Transfert");
> @readfile($file_to_download);
>
> Instead downloading the file the script opens it.

Why are you not sending "attachment" if it's IE? I simply use:

    header("content-type: application/vnd.ms-excel; name='excel'");
    header("content-disposition: attachment; filename=" . $filename .
".xls");

and haven't had any trouble. You'll obviously want to adjust the
content-type, but I still send "attachment".

---John Holmes...

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

Reply via email to