search

Home  >  Q&A  >  body text

I don't understand what happened. syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM)

Protected Function_Initialize ()
{
Parent :: Initialize ();
Define ('Aa', Session :: GET ('Admin_id'));
}
/ /Determine whether the user is logged in at the entrance in the background
protected function isLogin()
{
if (empty(AA)){
$this->error('The user is not logged in and has no rights Access',url('Index/login'));
} }
}
//Prevent users from logging in repeatedly
protected function alreadyLogin(){
 
                                                     )){
                $this->error('The user has already logged in, please do not log in again',url('Index/index'));

正儿扒经正儿扒经2515 days ago2460

reply all(4)I'll reply

  • 我只是一条咸鱼哈

    我只是一条咸鱼哈2017-12-25 18:40:00

    It’s a pitfall of TP5. I also reported an error after watching the video like this. I don’t think empty can be used to judge the defined constant (that is, the constant AA you defined). I used a variable to catch it before judging. Define constants and then use them for judgment. It actually works (ー_ー)!! What?

    reply
    0
  • 谁把我昵称占了

    谁把我昵称占了2017-12-25 16:42:47

    parent::initialize(); written as parent::_initialize(); take a look

    reply
    1
  • 鸢尾花

    No, still reporting an error

    鸢尾花 · 2018-01-03 17:51:50
  • Cancelreply