note 68401 added to function.header
| From: | NickSterling at osu1 dot php dot net | Date: | Tue, 25 Jul 2006 18:17:16 +0000 |
| Subject: | note 68401 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115166@lists.php.net to get a copy of this message | ||
Internet Explorer could not find the temporary file it was trying to download, so after many hours
of searching, this is what I have come up with (and it's working)...
<?php
header("Cache-Control: public, must-revalidate");
header("Pragma: hack");
header("Content-Type: " . $mime_type);
header("Content-Length: " .(string)(filesize($downloadfile)) );
header('Content-Disposition: attachment;
filename="'.basename($downloadfile).'"');
header("Content-Transfer-Encoding: binary\n");
$fp = fopen($downloadfile, 'rb');
$buffer = fread($fp, filesize($downloadfile));
fclose ($fp);
print $buffer;
?>
----
Server IP: 66.163.161.117
Probable Submitter: 74.67.198.13
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/note/edit/68401
Del: integrated -- http://master.php.net/note/delete/68401/integrated
Del: useless -- http://master.php.net/note/delete/68401/useless
Del: bad code -- http://master.php.net/note/delete/68401/bad+code
Del: spam -- http://master.php.net/note/delete/68401/spam
Del: non-english -- http://master.php.net/note/delete/68401/non-english
Del: in docs -- http://master.php.net/note/delete/68401/in+docs
Del: other reasons-- http://master.php.net/note/delete/68401
Reject -- http://master.php.net/note/reject/68401
Search -- http://master.php.net/manage/user-notes.php