ThinkPHP3.2.3 构造函数

public function _initialize(){
        if(!$_SESSION['username']){
            $this->error('请先登录',U('Admin/Login/index'));
        }
    } ​​​​

posted @ 2017-03-09 10:52  张忠冉  阅读(649)  评论(0编辑  收藏  举报