我正在使用 laravel 和这个:
https://github.com/comodojo/metaweblog/
这是控制器中的代码:
public function testNewPost() {
$mwlog = new MetaWeblog("http://example.org/services/metablog.ashx","user","pass");
$struct = array(
'title' => "Test Post",
'description' => "Test Post description",
'post_type' => "post",
'categories' => array('uncategorized'),
'mt_keywords' => array('test','post'),
'mt_allow_comments' => "open",
'mt_allow_pings' => "open"
);
$post = $mwlog->newPost($struct);
}
但它返回:
输入字符串的格式不正确。
怎么了?!