note 72627 deleted from function.header by tularis

From: Date: Fri, 20 Apr 2007 14:14:42 +0000
Subject: note 72627 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125624@lists.php.net to get a copy of this message
Note Submitter: Dave Bachtel ---- When working with .pdfs and IE6 (especially when trying to generate headers dynamically), alot of people are encountering the 'There was an error opening this document. This file cannot be found.' that the .pdf reader is throwing after being shelled from IE. Here is a solution (tested in both Firefox and Internet Explorer 6) that seems to work for me (as of 01/26/2007): <?php //Fix cache control for PDFs in IE header('Content-Disposition: attachment; filename="downloaded.pdf"'); header('Expires: 0'); header('Pragma: cache'); header('Cache-Control: private'); echo $pdf->Output("","S"); exit(); ?> It's a simple fix to an IE caching bug. Good luck!

« previous php.notes (#125624) next »