本文整理匯總了PHP中Haanga::setCacheDir方法的典型用法代碼示例。如果您正苦於以下問題:PHP Haanga::setCacheDir方法的具體用法?PHP Haanga::setCacheDir怎麽用?PHP Haanga::setCacheDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Haanga
的用法示例。
在下文中一共展示了Haanga::setCacheDir方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: microtime
<?php
/**
* Simple example rendering a user list
* ------------------------------------
*
* @credit - adapt from ptemplates sample
*/
require "../lib/Haanga.php";
Haanga::registerAutoload();
Haanga::setCacheDir('tmp/');
Haanga::setTEmplateDir('inheritance/');
$time_start = microtime(true);
Haanga::Load('page.html', array('title' => microtime(TRUE), 'users' => array(array('username' => 'peter', 'tasks' => array('school', 'writing'), 'user_id' => 1), array('username' => 'anton', 'tasks' => array('go shopping'), 'user_id' => 2), array('username' => 'john doe', 'tasks' => array('write report', 'call tony', 'meeting with arron'), 'user_id' => 3), array('username' => 'foobar', 'tasks' => array(), 'user_id' => 4))));
echo "in " . (microtime(true) - $time_start) . " seconds\n<br/>";