最近在修改Discuz的代码以供客户使用,遇到一个问题就是BBS的帖子管理在Chrome和FireFox中无法正常加载处理,只出现一个处理中的层,然后就没有下文了。

调试发现是一段XML的问题。“XML declaration allowed only at the start of the document.........

遇到这样的错误一般是xml开头有空行存在,请从配置文件开始找,删除头部与尾部空行即可!

这一段代码是在Template下的_header.html文件里的

    </div>
     <%else%>
     <%csharp%>
     Response.Clear(); Response.ContentType = "Text/XML"; Response.Expires = 0; Response.Cache.SetNoStore();
     <%/csharp%>
<?xml version="1.0" encoding="utf-8" ?> <root> <![CDATA[ <%/if%>

默认是在<%/csharp%>后换行然后写的xml声明内容,导致出错。只需要吧声明上面的换行和空格删除即可。

相关文章:

  • 2021-07-21
  • 2021-08-28
  • 2021-06-06
  • 2022-12-23
  • 2021-08-10
  • 2021-05-30
  • 2021-08-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2022-01-20
  • 2021-12-11
  • 2021-11-26
  • 2021-06-24
相关资源
相似解决方案