本文整理汇总了PHP中sys::time_start方法的典型用法代码示例。如果您正苦于以下问题:PHP sys::time_start方法的具体用法?PHP sys::time_start怎么用?PHP sys::time_start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sys
的用法示例。
在下文中一共展示了sys::time_start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
static function init()
{
self::$time_start = sys_get_microtime();
// clean request vars
if (ini_get("magic_quotes_gpc") !== false and get_magic_quotes_gpc()) {
modify::stripslashes($_REQUEST);
}
foreach ($_REQUEST as $key => $val) {
if (is_array($val) and count($val) > 0) {
$_REQUEST[$key] = array();
foreach ($val as $val2) {
if (!is_array($val2)) {
$_REQUEST[$key][$val2] = $val2;
}
}
}
}
// set up smarty
self::$smarty = new Smarty();
self::$smarty->register_prefilter(array("modify", "urladdon_quote"));
if (isset($_REQUEST["print"])) {
self::$smarty->register_outputfilter(array("modify", "striplinksforms"));
}
if (isset($_REQUEST["print"])) {
self::$smarty->assign("print", $_REQUEST["print"]);
}
self::$smarty->compile_dir = SIMPLE_CACHE . "/smarty";
self::$smarty->template_dir = "templates";
self::$smarty->config_dir = "templates/css";
self::$smarty->compile_check = false;
// refresh smarty cache
if (DEBUG) {
debug_check_tpl();
}
// set up database
if (!sql_connect(SETUP_DB_HOST, SETUP_DB_USER, sys_decrypt(SETUP_DB_PW, sha1(SETUP_ADMIN_USER)), SETUP_DB_NAME)) {
$err = sprintf("{t}Cannot connect to database %s on %s.{/t}\n", SETUP_DB_NAME, SETUP_DB_HOST) . sql_error();
trigger_error($err, E_USER_ERROR);
sys_die($err);
}
// verify credentials
login_handle_login();
}