This is not a bug.  This is just one of many differances between the big
browser war.  With Netscape (not sure which versions), the attachment thing
I found is required.  But with IE it kills the browser.

<?

define('MSIE', (preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT])?1:0));
header("Cache-Control: no-cache, must-revalidate");
header("Content-Type:".$mime_type);
header("Content-Disposition: ".(MSIE?'':'attachment;
')."filename=$filename");
echo $filedata;

?>
----- Original Message -----
From: "xdrag" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, September 07, 2002 7:38 PM
Subject: [PHP] header() problem!!!!


> Hi:
> is this a bug?
> [win98se + apache2.0.40 + PHP4.2.3 + IE6.0]
>
> download1.php:
> <?php
> ...
> header("Cache-Control: no-cache, must-revalidate");
> header("Content-Type:".$mime_type);
> header("Content-Disposition: filename=$filename");
> echo $filedata;
> ?>
> works well....
>
> download2.php:
> <?php
> ...
> header("Cache-Control: no-cache, must-revalidate");
> header("Content-Type:".$mime_type);
> header("Content-Disposition: attachment; filename=$filename");
> echo $filedata;
> ?>
> please pay attention to header("Content-Disposition: ...")
> if you click this URL, for example "download2.php?id=1", then click the
"save" button,
> your browser will suffer a fatal error. You can not do anything else now!
>



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

Reply via email to