note 81299 added to function.header
| From: | opt at osu1 dot php dot net | Date: | Thu, 21 Feb 2008 17:21:44 +0000 |
| Subject: | note 81299 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136360@lists.php.net to get a copy of this message | ||
I am using the following headers but they do not allways work in Firefox, a lot of users are just
getting a blank page. I have seen the note about removing white spaces but I am not ouputting
anyhthing to the page.
I am linking to the php file from an html link and the php file contains this header info, most
broswers just downlaod the file staright from the link, but not Firefox.
//Begin writing headers
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-Description: File Transfer");
//Use the switch-generated Content-Type
header("Content-Type: $ctype");
//Force the download
$header="Content-Disposition: attachment; filename=".$filename.";";
header($header);
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$len);
@readfile($file);
// exit;
----
Server IP: 83.170.119.58
Probable Submitter: 91.106.147.189
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/81299
Del: integrated -- https://master.php.net/note/delete/81299/integrated
Del: useless -- https://master.php.net/note/delete/81299/useless
Del: bad code -- https://master.php.net/note/delete/81299/bad+code
Del: spam -- https://master.php.net/note/delete/81299/spam
Del: non-english -- https://master.php.net/note/delete/81299/non-english
Del: in docs -- https://master.php.net/note/delete/81299/in+docs
Del: other reasons-- https://master.php.net/note/delete/81299
Reject -- https://master.php.net/note/reject/81299
Search -- https://master.php.net/manage/user-notes.php