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

2020年3月10日 · 12 views · 

今天在使用Wordpress生成站点地图Sitemap时,提示错误:

This page contains the following errors:
error on line 5 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.

原因是在除了主题页面之外其它的页面(config.php/function.php/安装的插件里面的php和其它调用的页面等)的“<?php”之前或者“?>”之后有空行,去掉即可。

返回

Steven's Website Copyright © 2020 Steven
Powerd by Wordpress & Theme by Steven
粤ICP备20028373号