timer on script

From: Date: Sun, 07 Jul 2002 02:09:55 +0000
Subject: timer on script
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5209@lists.php.net to get a copy of this message
I have the following template file and want to pass the $timer variable through to footer.tpl so I can use it. How can I do this? Yes I know in debug mode I get the execution time but I want to just show the time at the bottom of the page. Any suggestions would be great. index.tpl ======================================================= {php} // start time execution of page $TIMER_START = explode(" ", microtime()); $TIMER_START = $TIMER_START[1] + $TIMER_START[0]; {/php} {include file="header.tpl"} {$form} {php} // end for timing execution of page $TIMER_END = explode(" ", microtime()); $TIMER_END = $TIMER_END[1] + $TIMER_END[0]; $timer = $TIMER_END - $TIMER_START; {/php} {include file="footer.tpl" timer=$timer} =======================================================

« previous php.smarty.general (#5209) next »