本文整理汇总了PHP中XTemplate::init方法的典型用法代码示例。如果您正苦于以下问题:PHP XTemplate::init方法的具体用法?PHP XTemplate::init怎么用?PHP XTemplate::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XTemplate
的用法示例。
在下文中一共展示了XTemplate::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cot_die_message
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && !defined('COT_NO_ANTIXSS') && (!defined('COT_AUTH') && $x != $sys['xk'] && (empty($sys['xk_prev']) || $x != $sys['xk_prev']) || $cfg['referercheck'] && !preg_match('`https?://([^/]+\\.)?' . preg_quote($sys['domain']) . '(/|:|$)`i', $_SERVER['HTTP_REFERER']))) {
$cot_error = true;
cot_die_message(950, TRUE, '', '', $_SERVER['HTTP_REFERER']);
}
/* ============ Head Resources ===========*/
if (!COT_AJAX) {
// May Be move it to header.php?
if (!isset($cot_rc_html[$theme]) || !$cache || !$cfg['headrc_consolidate'] || defined('COT_ADMIN')) {
// Load standard resources
cot_rc_add_standard();
// Invoke rc handlers
foreach (cot_getextplugins('rc') as $pl) {
include $pl;
}
}
if (!defined('COT_ADMIN')) {
if (file_exists("{$cfg['themes_dir']}/{$usr['theme']}/{$usr['theme']}.rc.php")) {
include "{$cfg['themes_dir']}/{$usr['theme']}/{$usr['theme']}.rc.php";
}
}
}
/* ============ /Head Resources ===========*/
// Cotonti-specific XTemplate initialization
if (class_exists('XTemplate')) {
XTemplate::init(array('cache' => $cfg['xtpl_cache'], 'cache_dir' => $cfg['cache_dir'], 'cleanup' => $cfg['html_cleanup'], 'debug' => $cfg['debug_mode'], 'debug_output' => (bool) $_GET['tpl_debug']));
}
/* ======== Global hook ======== */
foreach (cot_getextplugins('global') as $pl) {
include $pl;
}