TP5 控制器名为双单词 找不到控制器

浏览:607 发布日期:2019/09/25 分类:ThinkPHP5专区 关键字: 控制器 找不到控制器
[0] HttpException in App.php line 583
控制器不存在:app\admin\controller\Admingroup

        try {
            $instance = Loader::controller(
                $controller,
                $config['url_controller_layer'],
                $config['controller_suffix'],
                $config['empty_controller']
            );
        } catch (ClassNotFoundException $e) {
            throw new HttpException(404, 'controller not exists:' . $e->getClass());
        }

        // 获取当前操作名
        $action = $actionName . $config['action_suffix'];

        $vars = [];
        if (is_callable([$instance, $action])) {
            // 执行操作方法
            $call = [$instance, $action];
<?php
namespace app\admin\controller;

class AdminGroup extends AdminBase {

    public function _initialize(){
        parent::_initialize();
    }

}
最佳答案
评论() 相关
后面还有条评论,点击查看>>