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,
],
],
];
本文详细介绍了Yii框架中frontend-config-main-local.php文件的配置方法,包括如何修改默认路由、请求组件的配置,如cookie验证和CSRF验证的开关设置。通过调整这些配置,可以更好地控制应用的行为。
1795

被折叠的 条评论
为什么被折叠?



