TP3.2中_initialize函数,父类和子类同时拥有的时候不调用父类的构造函数?

浏览:4581 发布日期:2014/07/12 分类:求助交流
父类public function _initialize(){
            echo 'dddd';exit;
            if(is_login()){
                $this->user_id=session('user_id');
                $this->type=session('type');
        


            }elseif(empty($_GET['weixin_key'])){
                not_login();
            }else{
                echo 'dd';exit;
                login($_GET['weixin_key']);
            }
        }
子类 public function _initialize(){
    echo 'index';exit;
            //dump($_SESSION);exit;
            if(is_user_login()){
            
                $this->user_id=session('user_id');
                $this->type=session('type');
            
            }elseif(empty($_GET['weixin_key'])){
                not_login();
            }else{
                login($_GET['weixin_key']);
            }
        }
输出的是index,未输出dd,要怎么解决呢?
最佳答案
评论( 相关
后面还有条评论,点击查看>>