header() problem!!!!
| From: | xdrag | Date: | Sun, 08 Sep 2002 02:38:09 +0000 |
| Subject: | header() problem!!!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-115637@lists.php.net to get a copy of this message | ||
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!