首页 > 代码库 > yii后台设置,和前台不同的session前缀和,登录地址

yii后台设置,和前台不同的session前缀和,登录地址

//为后台登录管理员设置session名字前缀信息        Yii::app()->setComponents(array(            ‘user‘=>array(                ‘stateKeyPrefix‘ =>‘seller‘,                ‘loginUrl‘=>array(‘seller/default/login‘),            )        ));

public function init()    {        // this method is called when the module is being created        // you may place code here to customize the module or the application        // import the module-level models and components        $this->defaultController = ‘User‘;        $this->setImport(array(            ‘admin.models.*‘,            ‘admin.components.*‘,        ));        //为后台登录管理员设置session名字前缀信息        Yii::app()->setComponents(array(            ‘user‘=>array(                ‘stateKeyPrefix‘ =>‘houtai‘,                ‘loginUrl‘=>array(‘admin/default/login‘),            )        ));    }

yii后台设置,和前台不同的session前缀和,登录地址