PHP to Determine Page Execution Time :
The below code is used to find the php page execution time.
Just paste the below code in header portion in php page.
<?php
$time = microtime();
$time = explode(" ",$time);
$time = $time[1] + $time[0];
$starttime = $time;
;?>
after the above code you can add other html or php codes.
and paste the below code in footer page of same php file.
<?php
$time = microtime();
$time = explode(" ",$time);
$time = $time[1] + $time[0];
$endtime = $time;
$totaltime = ($endtime - $starttime);
echo "This page execution time is ".$totaltime." seconds";
;?>
0 comments:
Post a Comment