note 43692 deleted from function.header by tomsommer

From: Date: Wed, 30 Jun 2004 15:00:09 +0000
Subject: note 43692 deleted from function.header by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72176@lists.php.net to get a copy of this message
Note Submitter: ian@iprcom.com ---- I too wasted many days trying to get a generated PDF to appear in IE but kept getting the "could not open" error message - it seems IE can't accept cookies and download files at the same time! The note from "s.j.eggen" below didn't help me, but see the note by "ned at wgtech dot com" in http://www.php.net/session_decode for the source of the following decodesession function. This worked perfectly for me as it doesn't set a session cookie in the header and allows you to add any other Cache-Control headers you like: <?php require_once("$DOCUMENT_ROOT/decodesession.php"); // // IE is broken with respect to cookies!!!!! AAARRGHHHH!!!! // $_SESSION = decodesession( file_get_contents( session_save_path() . '/sess_' . $PHPSESSID ) ); // now use the session data to generate and output // the pdf document... ?> Note that any changes to the session variables won't be preserved in the session - so this is only good for scripts that generate pages or files that contain no "onward" links.

« previous php.notes (#72176) next »