日期:2014-05-17  浏览次数:20397 次

THINKPHP 框架报:XML标签语法错误 : file="Public:header"
THINKPHP 框架报:XML标签语法错误 : file="Public:header"
空间PHP版本5.1.1
效果如:http://ftp-jiangshilin.k8.comsz.com/
可运行http://ftp-jiangshilin.k8.comsz.com/test.php查看版本

------解决方案--------------------
在一次开发中我在模板中用include标签包含其他模板文件,如下

<include file="Public:header">结果发生错误,如:PHP ThinkException: XML标签语法错误 : file='Public:header' >


thinkphp模板是基于xml文件格式的

也就是说正确的写法如:<include file="Public:header" />,也就是说少了一个斜杠。我的妈啊,就因为这个斜杠,差点没把我搞死,都怪平时写程序没有严格按照xml格式来写。

http://blog.csdn.net/luguo0816/article/category/928439