解析错误:语法错误,意外的T_PUBLIC,期望在C:\xampp\htdocs\app\class.engine中有T_CLASS。php在第75行

时间:2021-08-21 22:35:03

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

我得到了这样的错误:解析错误:语法错误,意外的T_PUBLIC,期望在C:\xampp\htdocs\app\class.engine中有T_CLASS。php在第75行

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

我不知道问题是什么我已经试过了所有的东西但还是没有。

Codes around Line 75

代码在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? :)

任何帮助吗?:)

1 个解决方案

#1


2  

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

请看这里:http://www.pastebin.com/iwSXr1Qa错误在第55行

#1


2  

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

请看这里:http://www.pastebin.com/iwSXr1Qa错误在第55行