Generating XML

From: Date: Wed, 25 Apr 2001 12:59:38 +0000
Subject: Generating XML
Groups: php.general 
Request: Send a blank email to php-general+get-50287@lists.php.net to get a copy of this message
Hi, I'm trying to write a script that generates XML dynamically and is viewable in a browser (IE). Even though I send a header saying "Content-type: text/xml\n", PHP still puts in a Content-type of text/html before that. How can I write the script so that this doesn't happen? Here's the script: <?php header("Content-type: text/xml\n"); echo <<<EOS <?xml version="1.0" encoding="UTF-8"?> <test> <blah>df</blah> </test> EOS; ?> Thanks so much for your help! (If you could cc a reply to my e-mail address, that'd be really appreciated.) Young

« previous php.general (#50287) next »