PHP显地某一程序或mysql查询的执行时间和效率 收藏
2009年11月16日


PHP显地某一程序或mysql查询的执行时间和效率

  1. $mtime = explode(' ', microtime());
  2. $my_starttime = $mtime[1] + $mtime[0];
  3. //do something
  4. $query='select *  from  table';
  5.  
  6. $mtime = explode(' ', microtime());
  7.  
  8. echo "<div>查询语句 ".$query."  耗时".number_format(($mtime[1] + $mtime[0] - $my_starttime), 6)."秒<div> ";
  9.  

 

本文永久链接: http://www.zzxj.net/blog/fxs_2008/archive/2009/11/16/86.html

发表于 @ 2009年11月16日 |评论(loading... )|收藏

发表评论 姓  名: