I have not had any problems on IE 6 with this. The code I am using on numerous 
scripts looks like this:

header("Content-Disposition: attachment; filename=$filename");
header("Content-Type: application/octet-stream");
fpassthru($filehandle);
fclose($filehandle);

Maybe the the combination of using the echo and the attachment field? The echo 
might not treat it as a "real" file? Just a thought.


On Wednesday 11 September 2002 03:33, Jim lucas wrote:
> 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!

-- 

Henrik Hudson
[EMAIL PROTECTED]

Note:  Beware of Dragons - Thou art crunchy and taste good with ketchup.


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

Reply via email to