概述
在head.htm中加入,也就是在默认模版中添加“$stime=microtime(true); //获取程序开始执行的时间”
复制代码 代码如下:
<!--<?php
$stime=microtime(true); //获取程序开始执行的时间
$GuideFid[$fid]=str_replace("<a href='$webdb[www_url]' class='guide_menu'>>首页</a>","",$GuideFid[$fid]);
$fupId=intval($fupId);
$topMenu[$fupId]='ck';
print <<<EOT
-->
这里是网页
再在foot.htm修改如:
复制代码 代码如下:
<!--
EOT;
$etime=microtime(true);//获取程序执行结束的时间
$total=$etime-$stime; //计算差值
echo "<br />[页面执行时间:{$total} ]秒";
?>
最后
以上就是着急咖啡为你收集整理的如何用php获取程序执行的时间的全部内容,希望文章能够帮你解决如何用php获取程序执行的时间所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复