PHPスクリプト統計ページ実行時間

444 ワード

PHPスクリプト統計ページの実行時間コードは以下の通りです.
//Create a variable for start time
$time_start = microtime(true);

// Place your PHP/HTML/JavaScript/CSS/Etc. Here

//Create a variable for end time
$time_end = microtime(true);
//Subtract the two times to get seconds
$time = $time_end - $time_start;

echo 'Script took '.$time.' seconds to execute';

転載先:https://www.cnblogs.com/phpcode/archive/2012/04/05/2522739.html