I create my RSS(XML) documents using PHP, so the information is always dynamic.
However, I ran into a problem when attempting to use the standard XML declaration, in my XML documents:
Since the XML declaration is similar to the PHP declaration,
... a big fat parse error is the only obvious output.
As you might guess, the question mark is what causes a bump. To get around this, one of two things has to be done:
- Make a small change in my php.ini file, or an .htaccess file.
- Echo a true string literal to the page, so PHP doesn’t parse the question marks.
Echo a string literal
Since I don’t have (or I am not sure if I have) access to my php.ini file, I went with option 2:
This seems to correct the issue.
php.ini or .htaccess
However, I still would like to know how to do it with step 1. I have done some research from the PHP end, and it seems there is a setting within the php.ini file, which needs to be turned on or off.
Also, I have heard there is a line in an .htaccess file that can do the same thing.
I will be looking into it.