note 75065 added to function.header

From: Date: Thu, 10 May 2007 16:00:58 +0000
Subject: note 75065 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-126391@lists.php.net to get a copy of this message
You may find that you want to process a PHP file, and have the browser treat the output as an XML file. Unfortunately, most browsers will only do this if the file extension is ".xml" In those situations where you can't/don't want to change your apache config to put XML files through the PHP processor, you can use the header function to change the output to something the browser will recognise as XML: header('Content-Type: text/xml'); header('Content-Disposition: inline; filename=sample.xml'); (The inline portion helps ensure the browser renders the page itself, instead of prompting the user to download the page) ~D ---- Server IP: 69.39.81.135 Probable Submitter: 204.194.77.3 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/75065 Del: integrated -- https://master.php.net/note/delete/75065/integrated Del: useless -- https://master.php.net/note/delete/75065/useless Del: bad code -- https://master.php.net/note/delete/75065/bad+code Del: spam -- https://master.php.net/note/delete/75065/spam Del: non-english -- https://master.php.net/note/delete/75065/non-english Del: in docs -- https://master.php.net/note/delete/75065/in+docs Del: other reasons-- https://master.php.net/note/delete/75065 Reject -- https://master.php.net/note/reject/75065 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126391) next »