//显示页面查询次数、加载时间和内存占用
function performance( $visible = false ) {
$stat = sprintf( '本次加载耗时:%.3fs',
timer_stop( 0, 3 )
);
echo $visible ? $stat : "<!-- {$stat} -->" ;
}
<?php if(function_exists('performance')) performance(true) ;?>
