我的环境是 Ubuntu 14.04.4 , Nginx php7.0 , Laravel 5.2
以下是错误信息
in Guard.php line 342
at Guard->getMessage() in Guard.php line 358
at Guard->handleRequest() in Guard.php line 155
at Guard->serve() in WechatSenior.php line 90
at WechatSenior->__construct(object(Wechat)) in ServiceController.php line 31
at ServiceController->index('8')
at call_user_func_array(array(object(ServiceController), 'index'), array('id' => '8')) in Controller.php line 80
at Controller->callAction('index', array('id' => '8')) in ControllerDispatcher.php line 146
at ControllerDispatcher->call(object(ServiceController), object(Route), 'index') in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(ServiceController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Home\ServiceController', 'index') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
我的代码如下
$options = [
'app_id' => $this->wechat->app_id,
'secret' => $this->wechat->app_secret,
'token' => $this->wechat->data->token,
'aes_key' => $this->wechat->data->aes,
'debug'=> true,
'log' => [
'level' => 'debug',
'permission' => 0777,
'file' => '/tmp/easywechat.log',
],
];
$app = new Application($options);
$server = $app->server;
$server->setMessageHandler(function($message){
return 'Message';
});
return $server->serve();
程序执行到最后一行
return $server->serve();
的时候就会报错,不知道是什么原因?难道有什么模块没有打开的原因?