本文主要是介绍Windows Live Writer与Wordpress Blog服务器响应无效,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Windows Live Writer与Wordpress Blog服务器响应无效
第一次使用WLW,看来问题还真是不少,上篇文章发布的时候就出现了下面的提示:服务器响应无效。虽然如此,但是刷新博客却发现文章已经成功发布,你说奇怪不奇怪?!
网上也有其他人碰上了这个问题,其中有人发现,WLW与XML Google Sitemaps存在冲突,通过升级、停用或者卸载插件可以解决这一冲突,也就不会再出现“服务器响应无效”的错误提示。
至于其原因,Peter Van Eeckhoutte分析说是由于程序编写的错误引起的错误,如下:
……you can see that the xml file is in fact truncated. The methodResponse element is not closed, which results in an error within Windows Live Writer……
This is caused because something (a plugin ? ……) decided to add UTF-8 BOM to the XML-RPC response. Result : the xml response is 3 bytes longer than expected, which causes the xml response to be truncated.
筷子理解是“由于UTF-8 BOM要求XML-RPC响应时,由于未知原因造成了XML响应超过3个字节而被截断,从而引起错误”,不知道这样讲是不是准确。
对症下药就简单了,下面是Peter给出的解决方法:
去WP文件目录wp-includes中找到文件class.IXR.php,利用编辑器打开该文件,然后找到
function output($xml)
将其长度计算公式,由
$length = strlen($xml);
改为
$length = strlen($xml)+3;
保存文件即可,问题是不是得到解决?
这篇关于Windows Live Writer与Wordpress Blog服务器响应无效的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!