note 46523 deleted from function.header by danbrown

From: Date: Sun, 07 Dec 2008 18:32:05 +0000
Subject: note 46523 deleted from function.header by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147833@lists.php.net to get a copy of this message
Note Submitter: smlsml AT g m a i l ---- In IE, you must allow inline PDFs to be cached or they will not load. Errors like: File type: Adobe Acrobat Control for ActiveX and Internet Explorer was unable to open this site Are caused by headers like: header("Pragma: no-cache"); header("Cache-Control: no-store, no-cache"); Use the following and generate a unquie filename: header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: must-revalidate"); $pdf_file = $filename . date("ymdhis") . ".pdf"; header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=\"$pdf_file\""); readfile("original.pdf");

« previous php.notes (#147833) next »