View Full Version : generation time
whackaxe
06-29-2002, 06:21 PM
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
mordred
06-30-2002, 03:51 PM
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.
Jeewhizz
06-30-2002, 11:26 PM
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
whackaxe
07-01-2002, 11:10 AM
thanks thats great:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.