Posted by Matthew Weier O'Phinney on 06/24/05 22:46
* Brian Dunning <brian@briandunning.com>:
> What am I doing wrong? This doesn't work. The browser does not even
> load the page, no error or anything:
>
> <?php
>
> echo '<?xml version="1.0"?><rss version="2.0"><channel>';
> echo '<item>';
> echo '<title>hdfghdf</title>';
> echo '<description>dfghdfh</description>';
> echo '<link>http://somelink</link>';
> echo '</item>';
> echo '</channel></rss>';
>
> ?>
You need to add the following before echoing anything:
header('Content-type: text/xml');
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:matthew@garden.org | http://vermontbotanical.org
Navigation:
[Reply to this message]
|