PHP显地某一程序或mysql查询的执行时间和效率
$mtime = explode(' ', microtime());
$my_starttime = $mtime[1] + $mtime[0];
//do something
$query='select * from table';
$mtime = explode(' ', microtime());
echo "<div>查询语句 ".$query." 耗时".number_format(($mtime[1] + $mtime[0] - $my_starttime), 6)."秒<div> ";
本文永久链接:
http://www.zzxj.net/blog/fxs_2008/archive/2009/11/16/86.html
发表于 @
2009年11月16日 |评论(loading...
)|收藏