[PHP] Re: Open Download-Box

2002-04-22 Thread Martin Thoma

 this is a problem of IE, not of PHP.

Year, but since I controll IE with PHP, I thought someone has a
php-workaround.

Martin


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




Re: [PHP] Re: Open Download-Box

2002-04-22 Thread Jason Wong

On Monday 22 April 2002 16:39, Martin Thoma wrote:
  this is a problem of IE, not of PHP.

 Year, but since I controll IE with PHP, I thought someone has a
 php-workaround.

You don't control IE, MS does.

Some versions of IE insist on trying to display the file regardless of what 
the headers tell it to do, and regardless of whether or not it has the plugin 
to display such a file. It's a bug which seems to have been fixed, then 
broken, then fixed, then broken, ...!

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
To add insult to injury.
-- Phaedrus
*/

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




[PHP] Re: Open Download-Box

2002-04-18 Thread Michael Virnstein

this is a problem of IE, not of PHP.
it seems that IE is ignoring headers in some cases.

Regards Michael

Martin Thoma [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello! I have a PDF-File, which the user should download (it should not
 open in the browser, even if the Adobe-Reader-Pluging is installed). I
 use:

  $filename = $DOCUMENT_ROOT./.$QUERY_STRING;
  $fd = fopen ($filename, rb);
  $contents = fread ($fd, filesize ($filename));
  fclose ($fd);

  header(Content-type: application/octet-stream);
  header(Content-Disposition:attachment;filename=$savename);

  echo $contents;

 This doesn't work in IE (Version 6, 5 is not tested yet): When I get the
 download-box and I choose open instead of save, the download-box
 opens again! Then pressing open, everything is okay, but why is the
 box opened twice?

 Martin





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