note 72627 added to function.header

From: Date: Fri, 26 Jan 2007 17:34:29 +0000
Subject: note 72627 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-122238@lists.php.net to get a copy of this message
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! ---- Server IP: 216.194.113.175 Probable Submitter: 69.15.224.158 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/72627 Del: integrated -- https://master.php.net/note/delete/72627/integrated Del: useless -- https://master.php.net/note/delete/72627/useless Del: bad code -- https://master.php.net/note/delete/72627/bad+code Del: spam -- https://master.php.net/note/delete/72627/spam Del: non-english -- https://master.php.net/note/delete/72627/non-english Del: in docs -- https://master.php.net/note/delete/72627/in+docs Del: other reasons-- https://master.php.net/note/delete/72627 Reject -- https://master.php.net/note/reject/72627 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122238) next »