头部: $stime = microtime(true); 尾部: $etime = microtime(true);//获取程序执行结束的时间$total = $etime - $stime; //计算差值 最后输出: echo "br /当前页面执行时间为:{$total} 秒";