0
意外的文件結尾
我得到一個錯誤:解析錯誤:語法錯誤,在PHP
Parse error: syntax error, unexpected end of file in ...\system\core\Loader.php(829) : eval()'d code on line 307..
這是loader.php
foreach ($this->_ci_model_paths as $mod_path)
{
if (! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
continue;
}
if ($db_conn !== FALSE AND ! class_exists('CI_DB'))
{
if ($db_conn === TRUE)
{
$db_conn = '';
}
$CI->load->database($db_conn, FALSE, TRUE);
}
if (! class_exists('CI_Model'))
{
load_class('Model', 'core');
}
require_once($mod_path.'models/'.$path.$model.'.php');
$model = ucfirst($model);
$CI->$name = new $model();
$this->_ci_models[] = $name;
return;
} // this line number 307
和eval代碼
if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE)
{
echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));//this is line number 829
}
else
{
include($_ci_path);
}
代碼
我試過尋找這個,但找不到任何東西。
這是codeigniter的核心加載文件。錯誤已經指向這個頁面,但它實際上在你的php代碼中。檢查你的代碼,尤其是你的模型被調用或調用的地方。 –