note 61498 added to function.header

From: Date: Sun, 05 Feb 2006 18:51:59 +0000
Subject: note 61498 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-103044@lists.php.net to get a copy of this message
in situation when I use SSL, sessions and send file to user technique, MSIE dont get a file. This code don't work: session_start(); header('Content-type: application/pdf'); header('Content-Disposition: inline; filename="file.pdf"'); header('Content-Length: ' . filesize($fileName)); readfile($fileName); And I get a solution: session_start(); header('Pragma: anytextexeptno-cache', true); header('Content-type: application/pdf'); header('Content-Disposition: inline; filename="file.pdf"'); header('Content-Length: ' . filesize($fileName)); readfile($fileName); The point is: replace header 'Pragma: no-cache' Good luck! ---- Server IP: 195.54.192.44 Probable Submitter: 213.252.114.222 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61498 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61498&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61498&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#103044) next »