AddType application/x-httpd-php .php .php3 .phtml .html .xml
After that, when I view the .xml file, I receive this PHP error:
Parsing error: Parsing error in /var/www/vhosts/mydomain.com/httpdocs/test.xml on line 1, unexpected T_STRING
but line 1 even Not php, because this is the first line:
Who can Tell me what is the problem?
Thank you.
Ok, first, I add this line to my .htaccess file so that the php engine can parse the php code in the .xml file:
< p>
AddType application/x-httpd-php .php .php3 .phtml .html .xml
After that, when I view the .xml file, I get this PHP error :
Parsing error: Parsing error in /var/www/vhosts/mydomain.com/httpdocs/test.xml on line 1, unexpected T_STRING
but line 1 Not even php, because this is line 1:
Who Can you tell me what the problem is?
Thank you.
That’s because It is a short open tag of php. Try it php echo' xml version="1.0" encoding="utf-8"? >‘;? >