wordpress feed XML解析错误

XML解析错误:xml处理指令不在外部实体的开始部分
位置:http://zlz.im/feed
行:2,列:1<?xml version="1.0" encoding="UTF-8"?>
^

第二次遇到这个问题了,轻车熟路,几下就解决掉了;

问题原因:在<?xml> 前面出现了  空格 或 回车 符号,导致无法识别。这个报错在firefox下的,IE正常显示,不报错,但是XML文件头部明显有几行空白。
    之所以出现空格回车,是最近某次对代码修改的不细心造成的误操作。

解决方法: 检测<?php…?php>,是否有多余的 回车 换行 符号;

1、检测 wp-config.php 文件,查看PHP主体之外的代码有无 回车符;
2、同上,检测 wp-rss2.php,wp-atom.php文件,如果最近没修改过,可略过;
3、同上,检测 functions.php 文件;
4、注意 feed是有缓存的,在修改完成之后,发一篇test 文章,使WP程序重建feed,从而查看效果;
5、若仍然有错,可以尝试暂时关闭所有插件,更换主题等逐个排除。

补充:某球遇到这个问题,发现是修改了wp-include/wp-db.php 导致的。

—————哥分割的不是线—-是帖———-

检讨一下:出现这个问题的根源:HzlzH直接在FTP上修改代码,无本地,无镜像,无备份。不出问题则以,一出问题就头大。
今后不嫌麻烦,先在镜像站上折腾完了,再来把代码贴到这里。折腾归折腾,WP还是需要我们爱惜的!
呵呵,不唠了,去做整站备份了,好习惯呐好习惯!

版权所有© HzlzH | 本文采用 BY-NC-SA 进行授权
转载需注明 转自: 《wordpress feed XML解析错误

相关文章

{ Leave a Reply ? }

  1. Auston Jary China Mozilla Firefox Windows

    沙发 :mrgreen:

  2. Firm China Internet Explorer Windows

    对于我们这些新手很有用,可惜没抢到沙发

  3. Auston Jary China Mozilla Firefox Windows

    对我这种大鸟来说…
    好吧.我去备份 :evil:

  4. zwwooooo China Mozilla Firefox Windows

    貌似很多人会遇到这个问题,我没遇到过

  5. 阿吴 China Google Chrome Windows

    碰到了来这找答案

  6. havxi China Google Chrome Windows

    我的现在也出现了这种问题,现在还没弄好。

    • havxi China Google Chrome Windows

      但我最近啥都没改啊?

  7. 胡余丰 China Internet Explorer Windows

    呵呵,见过好多专业性很强的博客
    可惜我不是很能看懂
    带不走知识,就留下羡慕吧

  8. 苏囧 China Internet Explorer Windows

    学习让人进步。。。

  9. 三七八蛋 China Mozilla Firefox Windows

    哥分割的不是寂寞吗?

  10. 超人 China Google Chrome Windows

    对xml一窍不通~~

  11. 江流 China Internet Explorer Windows

    @超人,我也一窍不通=。=

  12. 8bu China Internet Explorer Unknow Os

    不知道为什么路过了,O(∩_∩)O哈哈~

  13. 江流 China Internet Explorer Windows

    我知道。。。我是为了不给超人发信息才故意的。。。

  14. 小杜 China Google Chrome Windows

    嗯,我遇到过这个问题,不过后来还使用插件解决的

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)