Yii指定控制器处理全部请求 傻大头 2019-11-13 279 阅读1分钟 有时候网站升级的时候,需要指定控制器处理全部请求,Yii中设置如下:打开配置文件main.php,在数组中加上:?1'catchAllRequest'=>array('update/index'),创建UpdateController:?1234567classUpdateControllerextendsController{ functionactionIndex(){// $this->render('index'); $this->renderPartial('index'); }}创建views,update/index.php:?1网站升级中。。。