5 Latest updates...
upload_file() 1 month
upload_image() 1 month
stripfilename() 1 month
image_exists() 1 month
filename_exists() 1 month
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Sponsors
Shoutbox
You must login to post a message.

29/06/2010
Nice work m8 Grin

30/05/2010
Just updated the site to latest version of v7.01 Smile

26/03/2010
shoutbox spam removed.

26/02/2010
Fixed!

26/02/2010
Ereg alert in fusion_functions/i
ncludes/inc.functi
ons.php !

User Options
Function - showrendertime (PHP-Fusion 7.01)
<< showcounter showsubdate >>
showrendertime - Show render time and database queries

Description

showrendertime ( [ boolean $queries] )

Function was first introduced in PHP-Fusion v7.01 to make it easier for designers and theme makers to implement the render time. While making the function there was also requested a way to show total number of database queries and it was implemented in this function too as an option.

Parameters

queries

Set this to true if you want the function to return the total number of queries current page used.

Return Values

Function will return the render time of the current page and number of database queries if the $queries is set to true.

Example#1 showrendertime() - no queries

Download Example  PHP
  1. <?php
  2. // Without using the $queries parameter
  3. echo showrendertime();
  4.  
  5. // Setting the $queries parameter to false
  6. echo showrendertime(false);
  7. ?>

Here we will echo just the rendering time for the page, look how the two codes return the same output.

Output to Example#1

Render time: 0.08 seconds

Render time: 0.08 seconds

Example#2 showrendertime() - with queries

Download Example  PHP
  1. <?php
  2. // Setting the $queries parameter to true
  3. echo showrendertime(true);
  4. ?>

Here we will echo the rendering time with the total number of queries used.

Output to Example#2

Render time: 0.08 seconds - 26 Queries

Changelog

VersionDescription
7.01.00 Function added to PHP-Fusion

Was this helpful?

Back to all functions...
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.