Interview Questions
Q.

how to find page loading time

 


Answer :
copy and paste the following code in top of the pages :

$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start_time = $time;

copy and paste the following code in last of the pages :

$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish_time = $time;
$total_time = round(($finish_time - $start_time), 3);
echo 'Page lodaing time '.$total_time.' seconds.'."\n";
Posted By : moderator
Post Answer :  
Answer * :
Are You? Already a Member New User
   
User Name / Email * :
Password * :
Security Code * :

(Enter security code above shown on image)