Php 致命错误:函数名必须是C:……中的字符串。。。。。。第6行

Php 致命错误:函数名必须是C:……中的字符串。。。。。。第6行,php,Php,一直在谷歌上寻找答案只是为了找出如何修复代码,但仍然无法修复, 真的需要帮助吗 PHP代码 /*------------------------------------管理连接-------------------------------------*/ 最终公共功能连接($type) { 全局$core,$\u配置; 如果(!$this->已连接) { $this->connection=$this->mysqli[$type]($_-CONFIG['mysqli']['localhost']

一直在谷歌上寻找答案只是为了找出如何修复代码,但仍然无法修复, 真的需要帮助吗

PHP代码

/*------------------------------------管理连接-------------------------------------*/
最终公共功能连接($type)
{
全局$core,$\u配置;
如果(!$this->已连接)
{
$this->connection=$this->mysqli[$type]($_-CONFIG['mysqli']['localhost'],$_-CONFIG['mysqli']['root'],$_-CONFIG['mysqli']['adventorer']);
如果($this->connection)
{
$mydatabase=$this->mysql['habbertro']($\u CONFIG['mysql']['habbertro'],$this->connection);
如果($mydatabase)
{
$this->connected=true;
}
其他的
{
$core->systemError('MySQL引擎','MySQL可以连接到数据库');
}
}
其他的
{
$core->systemError('MySQL引擎','MySQL可以连接到主机');
}
}
}

更改可变函数调用。有几种方法。以下是一种方法:

这:

变成:

$func = $this->mysqli[$type];
$this->connection = $func($_CONFIG['mysqli']['localhost'], $_CONFIG['mysqli']['root'], $_CONFIG['mysqli']['adventurer']);
对整个Php遵循相同的模式 致命错误:函数名必须是……….中的字符串。。。。。。。。。。第49行


第6行是哪一行?错误消息的其余部分是什么?$mydatabase=$this->mysql应该是$this->mysqli吗?或者$this->mysqli是指$this->connection=$this->mysqlthis-one$this->connection=$this->mysqli[$type]($_-CONFIG['mysqli']['localhost'],$_-CONFIG['mysqli']['root'],$_-CONFIG['mysqli']['adventurer']);张贴行号,显示完整的错误消息,并记录PHP版本。
$func = $this->mysqli[$type];
$this->connection = $func($_CONFIG['mysqli']['localhost'], $_CONFIG['mysqli']['root'], $_CONFIG['mysqli']['adventurer']);