Parse error: syntax error, unexpected T_PUBLIC, expecting T_CLASS in C:\xampp\htdocs\app\class.engine.php on line 75

StackOverflow https://stackoverflow.com/questions/21414680

  •  04-10-2022
  •  | 
  •  

I'm getting this error of : Parse error: syntax error, unexpected T_PUBLIC, expecting T_CLASS in C:\xampp\htdocs\app\class.engine.php on line 75

I don't know what the problem is i've tried everything really but still nothing

Codes around Line 75

final public function disconnect()
{
    global $core;
    if($this->connected)
    {
        if($this->mysql['close'])
        {
            $this->connected = false;
        }
        else
        {
            $core->systemError('MySQL Engine', 'MySQL could not disconnect.');
        }
    }
}

Any help? :)

有帮助吗?

解决方案

Does this function appear inside the rest of your class definition {} ? Sounds like maybe your class { ... } closes prematurely before this.

Turns out you were declaring a new function within a function, because of one missing closing bracket.

See here: http://www.pastebin.com/iwSXr1Qa the error was at line 55

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top