//status 0 错误 1未登入 2已登入
public function uidbindclientid(){
$client_id=I("post.client_id",'');
if(!$client_id){
$this->ajaxReturn(array("status"=>0,'msg'=>'client_id异常,绑定失败'));
}
Timer::add(1,function(){
echo 444;
});
$user_id=session("user_id");
if(!$user_id){
$data=1;
$data="unlogin";
}else{
$data=2;
$data="logining";
Gateway::bindUid($client_id,$user_id);
}
$this->ajaxReturn($data);
}
你这段代码是运行在apache或者php-fpm里?
workerman是运行在php命令行下的,不能在apache或者php-fpm下跑的