I don't understand what happened. syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
正儿扒经
正儿扒经 2017-12-25 10:46:29
0
4
2491

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'));

正儿扒经
正儿扒经

reply all(2)
我只是一条咸鱼哈

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?

谁把我昵称占了

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

  • reply No, still reporting an error
    鸢尾花 author 2018-01-03 17:51:50
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template