为了测试目的,在PHP 5.4中我有以下脚本:
(脚本来自此处:https://serverfault.com/questions/192211/iis-logging-write-to-log-file-more-often) 执行时间为:0.00002秒。
我在本地的Web服务器IIS7.5上运行。 我也使用Chrome浏览器。
加载页面需要1秒钟。您有什么想法为什么会需要这么长时间?我期望它应该立即响应。 敬礼, 保罗
define(START_TIME_CUSTOM, microtime(true));
function onEndTimeCompute() {
$timeTaken = microtime(true) - START_TIME_CUSTOM;
echo "Completed In: ".number_format($timeTaken, 4)." Seconds\n";
}
register_shutdown_function('onEndTimeCompute');
echo "Just before exit";
exit;
echo "Just after exit";
(脚本来自此处:https://serverfault.com/questions/192211/iis-logging-write-to-log-file-more-often) 执行时间为:0.00002秒。
我在本地的Web服务器IIS7.5上运行。 我也使用Chrome浏览器。
加载页面需要1秒钟。您有什么想法为什么会需要这么长时间?我期望它应该立即响应。 敬礼, 保罗