Kir*_*ula 15 php codeigniter codeigniter-3
我在XAMPP中部署了我的源代码.我遇到了以下错误.
注意:在第257行的C:\ xampp\htdocs\3c_app\public_html\system\core\Common.php中只能通过引用返回变量引用
致命错误:在C:\ xampp\htdocs\3c_app中找不到类'CI_Controller'第233行的\ public_html\system\core\CodeIgniter.php.
我的源文件是:
的common.php
// Are any values being dynamically replaced?
if (count($replace) > 0)
{
foreach ($replace as $key => $val)
{
if (isset($config[$key]))
{
$config[$key] = $val;
}
}
}
return $_config[0] =& $config;
}
Run Code Online (Sandbox Code Playgroud)
第257行是: return $_config[0] =& $config;和
Codeigniter.php
// Fetch the config file
if ( ! file_exists($file_path))
{
exit('The configuration file does not exist.');
}
require($file_path);
Run Code Online (Sandbox Code Playgroud)
第233行: if ( ! file_exists($file_path))
任何人都可以帮忙???
aia*_*iai 41
试试这个:
在Common.php中更改它
if (count($replace) > 0){
foreach ($replace as $key => $val){
if (isset($config[$key])){
$config[$key] = $val;
}
}
}
$_config[0] =& $config;
return $_config[0];
Run Code Online (Sandbox Code Playgroud)
另请参见此处,以获取更多参考:仅应通过引用返回变量引用 - Codeigniter.我希望这有帮助.
Abd*_*lam 15
在Common.php中改变这个
return $_config[0] =& $config;
Run Code Online (Sandbox Code Playgroud)
对此
$_config[0] =& $config;
return $_config[0];
Run Code Online (Sandbox Code Playgroud)
问题在于分配和返回数据.