您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 计算页面执行时间的方法

2024/6/7 20:02:08发布27次查看
php 计算页面执行时间的方法
starttime = $this->get_microtime();
}
function stop()
{
$this->stoptime = $this->get_microtime();
}
function spent()
{
return round(($this->stoptime - $this->starttime) * 1000, 1);
}
}
//例子
start();
//你的代码开始
$a = 0;
for($i=0; $istop();
echo 页面执行时间: .$runtime->spent(). 毫秒;
?>
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product