Wordpress网络不显示图像;图像已损坏

问题描述:

使用Wordpress 3.x网络。升级到最新版本后,所有图像都停止显示。Wordpress网络不显示图像;图像已损坏

进一步检查时,图像数据正在传输,但图像文件本身已损坏。将Wordpress wp-includes/ms-files.php脚本发送的图像与服务器上的源文件进行比较,看起来正在将多余的空白添加到图像数据中。

如果您使用wordpress-mu-domain-mapping pl ugin,验证./wp-content/sunrise.php文件在关闭php标记后没有包含额外的行。

+0

在意识到feeds的xml格式不正确(在响应正文的顶部包含一个额外的空白行)后发现这个新解决方案。 – NightFury 2012-08-23 00:28:46

添加的代码到下面的行WP-包括/ MS-files.php的ReadFile的解决了这个问题之前:

+ob_clean(); 
+flush(); 

// If we made it this far, just serve the file 
readfile($file); 

附加读: