note 75065 deleted from function.header by danbrown

From: Date: Sun, 07 Dec 2008 18:14:40 +0000
Subject: note 75065 deleted from function.header by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147814@lists.php.net to get a copy of this message
Note Submitter: dracolytch at yahoo dot com ---- 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

« previous php.notes (#147814) next »