Helpful Information
 
 
Category: PHP
generation time

came someone tell me what hte variable or function is to show the time that to php file took to generate? if this isnt a variable or function could someone please tell me how todo it thanks

Can you be more specific about "generate", because it's not clear to me if you want to retrieve the time when a PHP file was last modified or how long it took a PHP script to process?

i think he means how long it takes for php to processes, or how long it to precess the page.

At the beginning of the page, put this



<?
include("includes/mysql.php");
$timeparts = explode(" ",microtime());
$starttime = $timeparts[1].substr($timeparts[0],1);
?>


at the bottom, put this before where you want to place teh message.



<?
$timeparts = explode(" ",microtime());
$endtime = $timeparts[1].substr($timeparts[0],1);
$total_length = $endtime-$starttime;
$total_length = round($total_length,6);
?>


Jee

thanks thats great:thumbsup:










privacy (GDPR)