Newbie: Setting content type

From: Date: Wed, 21 Aug 2002 15:12:59 +0000
Subject: Newbie: Setting content type
Groups: php.windows 
Request: Send a blank email to php-windows+get-15416@lists.php.net to get a copy of this message
How do I set the content type to text/xml?? I have a small php script which queries a database and returns the results as an xml document. However the flash application is not parsing the xml correctly and I believe it is because the response is in text/html. I've tired the following:- <?php header("Content-type: text/xml "); phpinfo(); ?> But this gives me the following error:- The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. ---------------------------------------------------------------------------- -- Required white space was missing. Error processing resource 'http://localhost/php%20test/info.php'. Line 1, Position 63 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> Any help wouild be appreicated as I'm completely new to php. Cheers, Baz

« previous php.windows (#15416) next »