搜尋

首頁  >  問答  >  主體

我這是哪裡錯了呀,幫忙看看謝謝了


protected function _initialize(){

    parent::_initialize();    //修改這裡

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

}

  protected function isLogin()

  {

  if(empty(USER_ID)){

  $this->error('使用者未登錄,無權存取',url('user/login'));

  }

  }

# protected function alreadyLogin()

  {

  if(empty(USER_ID)){

  $this->error('使用者已登錄,請勿重複登入', url('index/index'));

  }

  }

index.html:1 Error in event handler for (unknown): TypeError: Cannot read property ' parentNode' of undefined出現這個報錯訊息,謝謝幫忙

木槿木槿2631 天前1256

全部回覆(2)我來回復

  • 必有失必有得

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

    empty換成defined

    回覆
    1
  • 必有失必有得

    這個是判斷存不存在 其實是不能不處理這個邏輯的

    必有失必有得 · 2017-12-21 21:16:56
  • 取消回覆