首页 > Web开发 > 详细

计算php脚本执行时间

时间:2017-08-12 09:43:24      阅读:163      评论:0      收藏:0      [点我收藏+]
<?php
    $stime=microtime(true); #获取程序开始执行的时间

    #你写的php代码

    $etime=microtime(true); #获取程序执行结束的时间
    $total=$etime-$stime;   #计算差值
    echo "<br />{$total} times";
?>

  

计算php脚本执行时间

原文:http://www.cnblogs.com/FireKing-zilaiye/p/7348830.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!