gii生成crud后访问出现的问题

crud生成后访问出错: Unknown Class – yii\base\UnknownClassException

第一种解决方法:修改属性yii\base\Application::controllerNamespace  ,在frontend/main.php中修改该属性为'app\controllers'

第二种解决方法:Unable to find 'frontend\controllers\PostController' in file: /var/www/advanced/frontend/controllers/PostController.php. Namespace missing? 将PostController.php中namespace app\controllers;改为namespace frontend\controllers;

http://www.yiifans.com/forum.php?mod=viewthread&tid=11647&extra=page%3D1




你可能感兴趣的:(YII框架)