Discuz debuginfo函数 调试信息
/**
* 调试信息
*/
function debuginfo() {
global $_G;
if(getglobal('setting/debug')) {
$db = & DB::object();
$_G['debuginfo'] = array(
'time' => number_format((microtime(true) - $_G['starttime']), 6),
'queries' => $db->querynum,
'memory' => ucwords(C::memory()->type)
);
if($db->slaveid) {
$_G['debuginfo']['queries'] = 'Total '.$db->querynum.', Slave '.$db->slavequery;
}
return TRUE;
} else {
return FALSE;
}
}
页:
[1]