note 56831 deleted from function.header by mazzanet
| From: | mazzanet@php.net | Date: | Fri, 16 Sep 2005 06:23:01 +0000 |
| Subject: | note 56831 deleted from function.header by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95265@lists.php.net to get a copy of this message | ||
Note Submitter: thomas dot vogelsberg at t-com dot net
----
hi folks,
just found out, that leaving 'attachment;' in the header('Content-Disposition... will
make IE show the proper filename instead of the scriptname (i still use IE5.0.something, shame on my
IT-support)
my code looks like this and it finally works (after screwing up a whole afternoon ;-) --> thanks,
bill)
<?php
// ... document-data is obtained from a DB ...
header("Pragma: public");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-type: '.$doc['content_type']);
header('Content-Disposition: filename='.$doc['orig_fname']);
readfile('data/'.$doc['fname']); // hidden dir as document repository
?>
hope, this helps some of you
greetz
tom