public function accessRules() { return array( array( ‘allow‘, ‘actions‘=>array(‘ajaxChangeImage‘,‘AjaxImage‘,‘changeInfo‘,‘my‘, ‘dashboard‘, ‘account‘,‘selectGoal‘, ‘ajaxPassword‘,‘learn‘, ‘ajaxOrder‘), ‘users‘=>array(‘@‘), ), array( ‘allow‘, ‘actions‘=>array(), ‘users‘=>array(‘*‘), ), array(‘deny‘, ‘users‘=>array(‘*‘), ), ); }
注意上面第二个规则,不能存在array()空数组,这样会造成整个过滤规则失效。如果对*用户没有做规则限制,则干脆不要写
时间: 2024-10-13 09:57:26