Revision 316
Added by stefan over 18 years ago
trunk/wb/framework/frontend.functions.php | ||
---|---|---|
249 | 249 |
// Function for page footer |
250 | 250 |
if (!function_exists('page_footer')) { |
251 | 251 |
function page_footer($date_format = 'Y') { |
252 |
global $starttime; |
|
253 |
$vars = array('[YEAR]', '[PROCESSTIME]');
|
|
252 |
global $starttime,$startmemory;
|
|
253 |
$vars = array('[YEAR]', '[PROCESS_TIME]', '[MEMORY_USAGE]');
|
|
254 | 254 |
$processtime=array_sum(explode(" ",microtime()))-$starttime; |
255 |
$values = array(date($date_format),$processtime); |
|
255 |
$values = array(date($date_format),$processtime,memory_get_usage()-$startmemory);
|
|
256 | 256 |
echo str_replace($vars, $values, WEBSITE_FOOTER); |
257 | 257 |
} |
258 | 258 |
} |
trunk/wb/index.php | ||
---|---|---|
24 | 24 |
*/ |
25 | 25 |
|
26 | 26 |
$starttime = array_sum(explode(" ",microtime())); |
27 |
$startmemory = memory_get_usage(); |
|
27 | 28 |
|
28 | 29 |
// Include config file |
29 | 30 |
require_once(dirname(__FILE__).'/config.php'); |
... | ... | |
56 | 57 |
// Display the template |
57 | 58 |
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php'); |
58 | 59 |
|
59 |
?> |
|
60 |
?> |
Also available in: Unified diff
Added support for tag [MEMORY_USAGE] in page footer. Renamed tag [PROCESSTIME] to [PROCESS_TIME]