note 81299 deleted from function.header by betz
| From: | betz@php.net | Date: | Fri, 21 Mar 2008 18:22:37 +0000 |
| Subject: | note 81299 deleted from function.header by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137307@lists.php.net to get a copy of this message | ||
Note Submitter: opt
----
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;