我正在尝试使用xml-rpc在wordpress安装上执行某些任务。
这就是我正在使用的
include_once '/local/www/xxxxxxxx/wp-includes/class-IXR.php';
$objClient = new IXR_Client('http://xxxxxxxx/xmlrpc.php');如果我在objClient上执行print_r,我会得到以下结果
IXR_Client Object
(
[server] => xxxxxxxx
[port] => 80
[path] => /library/xmlrpc.php
[useragent] => The Incutio XML-RPC PHP Library
[response] =>
[message] =>
[debug] =>
[timeout] => 15
[headers] => Array
(
)
[error] =>
)我不明白的是,超时时的15是什么意思,为什么它会超时。有什么建议吗?
发布于 2012-11-06 19:34:25
15是以秒为单位的最长时间,在此时间之前,如果未与服务器建立连接,客户端将停止其尝试。您可以尝试通过查看IXR documentation将其设置为更高的值。
就像这样
$objClient = new IXR_Client('xxxxxxxx', 'library/xmlrpc.php', 80, 30);将时间限制增加到30秒,应该足够了。
https://stackoverflow.com/questions/13249958
复制相似问题