search

Home  >  Q&A  >  body text

Where did I go wrong? Please help me. Thank you.


protected function _initialize(){

parent::_initialize(); //Modify here

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

}

protected function isLogin()

{

if(empty(USER_ID)){

$this->error('The user is not logged in and has no access rights',url('user/login'));

}

}

protected function alreadyLogin()

{

if(empty(USER_ID)){

$this->error('The user has already logged in, please do not log in again', url('index/index'));

}

}

index.html:1 Error in event handler for (unknown): TypeError: Cannot read property ' parentNode' of undefined this error message appears, thank you for your help

木槿木槿2660 days ago1273

reply all(2)I'll reply

  • 必有失必有得

    必有失必有得2017-12-21 21:08:35

    empty is replaced with defined

    reply
    1
  • 必有失必有得

    This is to determine whether the existence exists. In fact, we have to deal with this logic.

    必有失必有得 · 2017-12-21 21:16:56
  • Cancelreply