Posts Tagged ‘XMLRPC’

使用Word2007写WordPress

Word2007新增了不少WEB功能,最近发现用它写博客蛮方便的。直接输自己WordPress的地址,账号便可以发布、修改博文。 具体的步骤大家打开Word2007一定很快就发现怎么用了。 这里贴出自己遇到的若干问题,以及解决方法: 1. 添加账号时,提示无法连接到博客提供商 1.a) 首先确认你的博客设置中Writing里的”Enable the Atom Publishing Protocol” 和 “Enable the WordPress, Movable Type, MetaWeblog and Blogger XML-RPC publishing protocols” 这两个选项已经勾上。这是启用XMLRPC,只用启用了此功能,Word才能连接到博客。 1.b) 如果已经启用了,但仍然无法连接,那么很可能是你的WordPress经过了手工编辑,可能是你自己编辑,也可能是安装包已经是经过修改的。而在修改时有相关文件被加上了UTF8编码标记。 打开wp-includes/class-IXR.php 文件,找到 $length = strlen($xml); header(’Connection: close’); header(’Content-Length: ‘.$length); header(’Content-Type: text/xml’); header(’Date: ‘.date(’r')); echo $xml; exit; 这段代码,大概应该在395行的样子,将设置Content-Length这句注释掉: $length = strlen($xml); header(’Connection: close’); header(’Content-Length: ‘.$length); //header(‘Content-Type: text/xml’); header(’Date: ‘.date(’r')); echo $xml; exit; [...]

Read the rest of this entry »