note 40688 added to function.header

From: Date: Thu, 11 Mar 2004 14:04:02 +0000
Subject: note 40688 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-66633@lists.php.net to get a copy of this message
I want to serve .pdf files, and my user get a dialog asking to open it in Acrobat Reader or save it. I use <?php header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename=file.pdf'); ?> and it's OK for almost every combination (using too al other headers you can see below). But Netscape 4.x with plugin installed open the .pdf inside the frame that send the request. I solve this changing the type in this way: <?php header('Content-Type: application/vnd.adobe.pdf'); ?> ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40688 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40688&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40688&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66633) next »