php后台如何避免用户直接进入方法实例
发布时间:2020-05-25 18:37:03 所属栏目:PHP 来源:互联网
导读:这篇文章介绍了php后台如何避免用户直接进入方法实例,有需要的朋友可以参考一下
|
1)创建BaseController控制器继承Controller(后台的一切操作要继承BaseController): 在BaseController里面添加: 代码如下:public function checkLogin() { if (Yii::app()->authority->isLogin() == Yii::app()->authority->getStatus('NOTLOGIN')) { 相关内容
|
