有没有办法确定使用 PHP 加载网页及其所有内容需要多长时间?
我已经尝试过这个:
$time_start = microtime(true);
(All the content of the web page here)
$time_end = microtime(true);
$time = $time_end - $time_start;
echo $time;
但是,这个问题(据我所知)是我只计算执行 php 脚本所需的时间。这不考虑页面上的任何图像或视频。
有没有办法确定使用 php 加载包括图像或视频在内的网页需要多长时间?
基本上我想要做的是测试我的服务器的速度,而不考虑我的连接速度。