Yii: The system is unable to find the requested action “select”

删除回忆录丶 提交于 2019-12-02 09:22:16

It seems that you have make the view file (protected/views/site/select.php) but you don't have created the corresponding action.

Add in SiteController:

public function accessRules() {
    //You can modify accordingly but you have to insert select to allowable actions
   return array(
        array('allow',  // allow all users to perform 'index', 'contact' and 'select' actions
            'actions'=>array('index', 'contact', 'select'),
            'users'=>array('*'),
        ),
        array('deny',  // deny all users
            'users'=>array('*'),
        ),
    );
}

 public function actionSelect() {
    $this->render('select');
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!