If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

but when i open that .xml file in safari nothing appeared. I listened in google that i must turn on parser, something like this in .htaccess :

PHP Code:

AddType application/x-httpd-php .php .xml

but when i add this string to htaccess and then open my site, ordinary page and a my xml rss file, but they just was download, when i open they. I don't know how to make my php code work in that xml file. Please help me. Thanks.

That's a good thing. It means the PHP was successfully processed on the server and output the XML text to your browser.

I think that the php doesn't work at all in this file because i try to add something to xml output like $test = "test"; and then echo this in <description> tags but nothing was appeared
i make like this but the ?> in this string: echo "<?xml version='1.0' encoding='utf-8'?>";
is recognized like a php close tag, i think it's because xml file, i try to put in just in the start of file (because if not the error appeared, that told this string must be in start of file) but after that nothing change.
may be i wrong and the rss feed had a xml markup but the .php file??
i talk with my hosting support they told me that all checked up and all ok.

I think that the php doesn't work at all in this file because i try to add something to xml output like $test = "test"; and then echo this in <description> tags but nothing was appeared
i make like this but the ?> in this string: echo "<?xml version='1.0' encoding='utf-8'?>";
is recognized like a php close tag, i think it's because xml file, i try to put in just in the start of file (because if not the error appeared, that told this string must be in start of file) but after that nothing change.
may be i wrong and the rss feed had a xml markup but the .php file??
i talk with my hosting support they told me that all checked up and all ok.

Can you more descriptive with "but nothing was appeared"? Are you viewing the source in a browser? Are you using an RSS reader?

I'm using a Safari browser, it has a rss reader, so i use it. When i open xml file with that code that i mentioned previously, i see a rss feed but it contain only that was in a xml markup, nothing about php code, like it isn't in that file at all. How can i make that php code carried???

I'm using a Safari browser, it has a rss reader, so i use it. When i open xml file with that code that i mentioned previously, i see a rss feed but it contain only that was in a xml markup, nothing about php code, like it isn't in that file at all. How can i make that php code carried???

What environment are you doing this testing in? PHP and MySQL must be run from a server, such as apache or IIS.

Generally speaking to create an rss feed you would create a file named rss.xml to do that you need to write the file out to the server. If you are just looking at what you think your browser will do with an rss feed, may not be correct if the rss feed is not really a rss feed. A php file must have a .php file extension, and an rss feed needs to be a .xml.

What environment are you doing this testing in? PHP and MySQL must be run from a server, such as apache or IIS.

Generally speaking to create an rss feed you would create a file named rss.xml to do that you need to write the file out to the server. If you are just looking at what you think your browser will do with an rss feed, may not be correct if the rss feed is not really a rss feed. A php file must have a .php file extension, and an rss feed needs to be a .xml.

English is not my native language, and if i clear understood what you told, i'm doing right. OK how i did my rss file: I made a file rss.xml, then i paste this