182.100.57.5 [23-Oct-2016:09:33:33 +0800] PHP Fatal error: Uncaught Error: Call to undefined function Think\C() in /data1/www/htdocs/553/fiachra/1/pnp/ThinkPHP/Library/Think/Think.class.php:304#012Stack trace:#012#0 /data1/www/htdocs/553/fiachra/1/pnp/ThinkPHP/Library/Think/Think.class.php(273): Think\Think::halt(Array)#012#1 [internal function]: Think\Think::fatalError()#012#2 {main}#012 thrown in /data1/www/htdocs/553/fiachra/1/pnp/ThinkPHP/Library/Think/Think.class.php on line 304 bx188
然后我找到报错代码发现是halt($error)函数,于是我dump($error),发现错误是来自于:TP框架中Log.class.php中的C()无法加载,为call undefined Think/C()
static function record($message,$level=self::ERR,$record=false) {
if($record || false !== strpos(C('LOG_LEVEL'),$level)) {
self::$log[] = "{$level}: {$message}\r\n";
}
}
1.部署时index.php中已经关闭了app_debug。
2.删除了runtime中的所有缓存文件。
以上步骤都没有用,于是我下载一个新的TP框架放入服务器中,发现也是报同样的错误。
关于TP中Log的报错如下:
182.100.57.5 [23-Oct-2016:09:33:33 +0800] PHP Fatal error: Uncaught Error: Call to undefined function Think\C() in /data1/www/htdocs/553/fiachra/1/pnp/ThinkPHP/Library/Think/Log.class.php:52#012Stack trace:#012#0 /data1/www/htdocs/553/fiachra/1/pnp/ThinkPHP/Library/Think/Think.class.php(227): Think\Log::record('Call to undefin...', 'ERR')#012#1 [internal function]: Think\Think::appException(ob
最佳答案