Home > php教程 > PHP源码 > 一行代码统计当前页面的总执行时间(不够精确,但够用)

一行代码统计当前页面的总执行时间(不够精确,但够用)

PHP中文网
Release: 2016-05-25 17:11:58
Original
1025 people have browsed it

误差:正负一秒

<?php
//这里是页面执行内容
echo microtime(TRUE) - $_SERVER[&#39;REQUEST_TIME&#39;];
?>
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template