码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-08-31 15:49:31      阅读:277      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   ar   div   cti   log   sp   

//为后台登录管理员设置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前缀和,登录地址

标签:style   blog   color   io   ar   div   cti   log   sp   

原文地址:http://www.cnblogs.com/sbfnxk201/p/3947731.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!