<?php //do something sleep(3); //do something $running_time = time() - $_SERVER['REQUEST_TIME']; echo '页面运行时间:',$running_time,' 秒'; ?>