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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.