XML报错:XML declaration allowed only at the start of the document

错误信息:
Warning: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document

检查后发现,xml文件的头文件开头处出现了多余的空格

1
<?xml version="1.0"?>

修改为:

1
<?xml version="1.0"?>

问题解决

// Add comment count