note 45773 deleted from function.header by danbrown

From: Date: Sun, 07 Dec 2008 18:32:44 +0000
Subject: note 45773 deleted from function.header by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147835@lists.php.net to get a copy of this message
Note Submitter: bjfield at gmail com ---- After upgrading to Windows XP Service Pack 2 (which may or may not be related to this issue), my IE became unable to fetch PDF files served up by the following code: header('Content-type: application/pdf'); readfile ($filepath); The error was "file not found," or something to that effect. This is the solution: header('Content-type: application/pdf'); header("Pragma: public"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header('Content-Length: ' . filesize($filepath)); readfile ($filepath); Ben

« previous php.notes (#147835) next »