Issue
I have this in my XML file
AddType application/x-httpd-php .xml
Which I am using so inside my XML file I can print things from inside a database.
However <?xml?> is apparently php and returns a parse error.
How can I fix this?
Solution
Try it using
AddHandler application/x-httpd-php5 .php .xml
Also check for short_open_tag and make sure it's in php.ini file and you are not using it
short_open_tag = Off
Also, you can write/generate xml from a .php file using (if this is an option)
<?php
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<item>
<title><?php echo "something"; ?></title>
</item>
<?php
// more php code
?>
Answered By - The Alpha
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.