RE: Re: [PHP] RSS Generation
| From: | php at swimwebs dot com | Date: | Mon, 10 Apr 2006 18:36:42 +0000 |
| Subject: | RE: Re: [PHP] RSS Generation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-233682@lists.php.net to get a copy of this message | ||
Thanks. I had added the header to the file. If the php extension is good enough, then I am not
going to worry about the .htaccess file.
>> ... When I tried saving it with an xml extension and
>> adding a .htaccess file to the directory in which the file was saved, I get
>> prompted to save the file instead of being able to view the file in a
>> browser. The only line in the .htaccess file is AddType
>> application/x-httpd-php xml.
>
>I had similar problems when trying to roll-my-own RSS feed with php.
>Michael is right that it doesn't matter what your file extension is
>(you probably don't even need that htaccess directive) as long as the
>file is served as XML. Try adding a header at the top of the file:
>
>header("Content-type: text/xml; charset=utf-8");
>
><rss version="2.0">
><channel>
>
>...
>
>I also use the Firefox browser which has a built-in XML browser that
>allows me to do a quick validation of the XML. You can also use
>www.feedvalidator.org to troubleshoot your feed once its online.
>
>- Greg
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>