Jump to content

[SOLVED] PHP Time to Load Page?


random1

Recommended Posts

Hey,

 

My website is nearly ready for deployment but there is page load timer issue:

 

The timer I have on my page outputs the page loading in 1199619070.61 seconds. Obviously wrong.

 

The website I've created uses many require() statements (around 10).

 

What's the best Page load timer script? I'm using the script from: http://www.totallyphp.co.uk/code/page_load_time.htm

Link to comment
https://forums.phpfreaks.com/topic/84724-solved-php-time-to-load-page/
Share on other sites

It is not wrong, you just didn't round the number off that's all.

 

/**
* $totaltime, $finish and $start are the variables used by the script
* from the link in your post. If you changed the variable names,
* do not forget to reflect those changes below.
*/

$total_time = round(($finish - $start), 4);

 

EDIT: Note, the results would look something like 0.0123. If you wish to change that result, just edit the number in that line of code from 4 to the number of digits you wish to show after the decimal place.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.