最后解决办法是在ThinkPHP\Library\Think\Db\Driver.class.php 去掉数据库调试模式判断
protected function debug($start) {
if($start) {
G('queryStartTime');
}else{
$this->modelSql[$this->model] = $this->queryStr;
//$this->model = '_think_';
// 记录操作结束时间
G('queryEndTime');
trace($this->queryStr.' [ RunTime:'.G('queryStartTime','queryEndTime').'s ]','','SQL');
}
}
本文介绍了一种解决ThinkPHP框架中数据库调试模式问题的方法,通过修改核心文件DbDriver.class.php来禁用调试功能,从而提高应用性能。
725

被折叠的 条评论
为什么被折叠?



