RSS出问题了

不知道为什么,突然发现feed出问题了,总是显示
This page contains the following errors:
error on line 2 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.


去google发现,这是因为wp-config.php之类的文件的< ?php开头外部有空行或者其他的内容。我不记得改过空行,之前曾经自己添加过两个php文件,里面可能不小心在开头空了两行,可是这两个文件我早就已经删除了,不知道为什么还不行。

http://feedvalidator.org/docs/error/WPBlankLine.html
这里说,我的这个xml的问题是:
Message

Blank line before XML declaration (WordPress)

Explanation

If an XML declaration () appears in your feed, it must be the first thing in the feed, before any whitespace.
Unfortunately, with WordPress it seems all too easy for a plugin, a theme, or for your configuration file to contain a blank line. Further compounding this problem, some — but not all — feed readers compensate for this common error, allowing the error to go undetected for quite a while.

Solution

PHP also uses a similar notation: < ?php ... ?>. Note that the final php ?> should be omitted from all PHP code files—modules, includes, etc. The closing delimiter is optional in PHP (but not in XML), and removing it helps prevent unwanted white space at the end of files which can cause problems with your feeds.
Check your wp-rss2.php and wp-atom.php files for blank lines outside of < ? and ?> bracketed sections.
Check your wp-config.php file for blank lines outside of < ? and ?> bracketed sections.
Check your theme’s functions.php file for blank lines outside of < ? and ?> bracketed sections.
One by one, disable plugins and revalidate until you isolate the one causing the problem.

哎,不过也许是因为feed的缓存或者因为我用了cache插件等过段时间看看是不是好了吧,现在没时间弄了。