在.xml文件PHP的错误? [英] PHP error in .xml file?
本文介绍了在.xml文件PHP的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
确定首先,我加入这行到我的.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;
这篇关于在.xml文件PHP的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文