note 46523 added to function.header

From: Date: Thu, 14 Oct 2004 06:51:45 +0000
Subject: note 46523 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-78525@lists.php.net to get a copy of this message
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: Mon, 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"); ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46523 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46523&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46523&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78525) next »