note 38346 deleted from function.readfile by aidan
| From: | aidan@php.net | Date: | Fri, 24 Sep 2004 01:27:52 +0000 |
| Subject: | note 38346 deleted from function.readfile by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77278@lists.php.net to get a copy of this message | ||
Note Submitter: slapidya(AT)yahoo.com
----
The way to force downloading proposed by Patrick didn't work over HTTPS for me. Here is what I
have used successfully:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".basename($filename).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();