[thelist] http header function does not work in IE 5.0

Matthias Ritzkowski Matt at grndwtr.com
Fri Jun 28 08:02:00 CDT 2002

Guten Morgen evoltistas,

I went to the MS-knowledgebase last night and they really suggest using an
active x control  or java applet for downloading!

I don't think so ...

This code  works in any browser, except MSIE

Has anyone else experienced this and maybe found a solution. None of the
one's I have found on the web have worked so far.

web server Apache, mod_ssl
This is on a secure page. I am trying to send headers through with PHP 4.1.2
I have already declared $file_name, $filesize and $file_path.

header("Content-Disposition: attachment; filename=$file_name");
header("Content-Type: application/pdf");
header("Content-Length: $filesize");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Expires: 0");
$fp = fopen("$file_path", "r");

print fread($fp, $filesize);

Any version of IE starts to download the page instead of the file, it
basically ignores the first header!!

Matthias Ritzkowski (the only person in the world who thinks Germany will
pull it off on Sunday)

More information about the thelist mailing list