Oakii
04-17-2005, 07:24 PM
I'm using this script
<?php
// Insert this block of code at the very top of your page:
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
// Place this part at the very end of your page
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ("This page took %f seconds to load.", $totaltime);
?>
From http://www.totallyphp.co.uk/code/page_load_time.htm
on www.AndrewKao.com
The index file of this site calls each respective section of the site. I put $time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time; at the very top. Because my footer has a design, rather then putting the rest of the script at the very bottom of the index file, I put it in the respective place in the footer (near bottom.. good enough).
The script runs, however I'm getting messages like
This page took 1113780068.989929 seconds to load
*scroll down to very bottom of page*
That is obviously incorrect. What would cause such a error?
Thanks
<?php
// Insert this block of code at the very top of your page:
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
// Place this part at the very end of your page
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ("This page took %f seconds to load.", $totaltime);
?>
From http://www.totallyphp.co.uk/code/page_load_time.htm
on www.AndrewKao.com
The index file of this site calls each respective section of the site. I put $time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time; at the very top. Because my footer has a design, rather then putting the rest of the script at the very bottom of the index file, I put it in the respective place in the footer (near bottom.. good enough).
The script runs, however I'm getting messages like
This page took 1113780068.989929 seconds to load
*scroll down to very bottom of page*
That is obviously incorrect. What would cause such a error?
Thanks
