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

计算页面执行时间

2024/3/20 19:07:39发布23次查看
页面|执行
计算页面执行时间
在php网页的开头加入以下
$time_start = getmicrotime();
function getmicrotime()
{
list($usec, $sec) = explode( ,microtime());
return ((float)$usec + (float)$sec);
}
?>
然后到最后加入以下代码
$time_end = getmicrotime();
printf ([页面执行时间: %.2f毫秒]\n\n,($time_end - $time_start)*1000);
?>
该用户其它信息

VIP推荐

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