note 29791 rejected from function.fpassthru by betz
| From: | betz@php.net | Date: | Wed, 26 Feb 2003 20:57:20 +0000 |
| Subject: | note 29791 rejected from function.fpassthru by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-44571@lists.php.net to get a copy of this message | ||
Hi
I am Creating a Txt File in Dynamic and Trying to Download it so that not to Display the Text in the
Browser. I have changed the Content Type and Pragma Settings but didnt get any Solution for that.
As it wont happens because the Default settings in the Browser accepts the Txt files and wont Force
to Download it. But If possible, if Any one have an Idea to do this Please Inform me
The Code is Give Below
$FileName = "fqif.txt";
$FileSize = filesize($FileName);
$FileType = filetype($FileName);
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header("Content-type: application/download");
header("Content-Disposition:inline; filename=".$FileName);
header("location:".$FileName);