After adding parent::initialize();, an error is reported
phpcn_u43886
phpcn_u43886 2017-10-24 11:23:23
0
4
1424

protected function _initialize(){

parent::initialize();//Inherit the initialization operation in the parent class

define('USER_ID', Session::get('user_id '));

}

In the Base controller, an error is reported after adding parent::initialize();. Why is this?


phpcn_u43886
phpcn_u43886

reply all(2)
酱油哎呦

protected function _initialize(){

parent::_initialize();    //修改这里

define('USER_ID', Session::get('user_id'));

}


  • reply The top and bottom are corresponding and cannot be modified.
    鸢尾花 author 2018-01-03 18:58:14
  • reply The yarn cannot be modified. Mine is 5.0.15, and the one in think controller is underlined.
    宇瞳 author 2018-04-03 17:07:06
nearest

Is there a parent class?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template