当我运行以下代码时,出现错误(致命错误:第 123 行的 E:\wamp\www\chat\vendor\abhinavsingh\jaxl\xep\xep_0206.php 中的最大执行时间超过 30 秒)。但是当我注释掉这行('bosh_url'=>' http://test.com:7070/http-bind ',)时,它似乎没问题。谁能告诉我怎么了?
<?php
require_once __DIR__ . '/vendor/autoload.php';
$client = new JAXL(array(
'jid' => 'devin@localhost',
'pass' => 'like',
'bosh_url' => 'http://test.com:7070/http-bind',
'log_path' => __DIR__ . '/logs',
'log_level' => JAXL_INFO,
'strict' => false,
));
$client->add_cb('on_auth_success', function() {
global $client;
echo 'on_auth_success', '<br/>';
$client->set_status("available!"); // set your status
//$client->get_vcard(); // fetch your vcard
//$client->get_roster(); // fetch your roster list
});
/*$client->add_cb('on_chat_message', function($msg) {
global $client;
echo 'on_chat_message', '<br/>';
// echo back
$msg->to = $msg->from;
$msg->from = $client->full_jid->to_string();
$client->send($msg);
});
$client->add_cb('on_disconnect', function() {
_debug("got on_disconnect cb");
});
*/
$client->start();