最新下载的thinkcmf5.1 ,在api中建了应用和controller,但访问时提示controller不存在,访问自带的demo也是。
$this->app['hook']->listen('module_init'); try { // 实例化控制器 $instance = $this->app->controller($this->controller, $this->rule->getConfig('url_controller_layer'), $this->rule->getConfig('controller_suffix'), $this->rule->getConfig('empty_controller')); } catch (ClassNotFoundException $e) { throw new HttpException(404, 'controller not exists:' . $e->getClass()); } $this->app['middleware']->controller(function (Request $request, $next) use ($instance) { // 获取当前操作名 $action = $this->actionName . $this->rule->getConfig('action_suffix'); if (is_callable([$instance, $action])) { // 执行操作方法 $call = [$instance, $action];
at Module->exec() in Dispatch.php line 168
at Dispatch->run() in App.php line 475
at App->think\{closure}(object(Request), object(Closure), null)
at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
at Middleware->think\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
at Middleware->dispatch(object(Request)) in App.php line 478
at App->run() in api.php line 39
0.话题发布后没及时显示,请联系官方QQ群管理;
1.话题支持代码,qq截屏直接粘贴,和QQ群一样;
2.问题描述清,比如服务器版本,程序版本;
3.能上代码,就不用文字;
4.把问题发到话题后再发QQ群;
5.如果感觉回复者解答的不错,可以发红包!
6.多帮助别人也是对自己的锻炼!
7.付费讨论中只有提问者和付费用户才可以查看回复
1.评论积分+1;每天最多10次奖励
2.发布话题积分+1;每天最多5次奖励
3.垃圾评论积分-500;
4.黄色,暴力,违反我国法律评论直接封号