确定首先,我加入这行到我的.htaccess文件使PHP引擎解析PHP code在.xml文件:
OK firstly, I added this line to my .htaccess file so the php engine parses php code in .xml file:
AddType application/x-httpd-php .php .php3 .phtml .html .xml
在这之后,当我查看.xml文件,我得到这个PHP错误:
After that when I view an .xml file I get this PHP error:
解析错误:解析错误,意想不到的T_STRING在/var/www/vhosts/mydomain.com/httpdocs/test.xml在线1
不过,1号线是不是甚至是PHP逸岸这是第1行:
But line 1 is not even php infact this is line 1:
<?xml version="1.0" encoding="utf-8"?>
谁能告诉我是什么问题?
Can anyone tell me what the problem is?
感谢。
这是因为&LT;
是PHP短开放标记
That's because <?
is the short opening tag for php.
尝试&LT; PHP的echo'&LT; XML版本=1.0编码=UTF-8&GT;?; ?&GT;