Yii2.0 高级版修改默认访问控制器

frontend->config->main-local.php

$config = [
    'defaultRoute' => 'index/index',//修改默认访问控制器
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            /*___*/
            'enableCookieValidation' => false,
            'enableCsrfValidation' => false,
        ],
    ],
];

  

猜你喜欢

转载自www.cnblogs.com/5aiQ/p/10521004.html