本文整理汇总了PHP中lang::init方法的典型用法代码示例。如果您正苦于以下问题:PHP lang::init方法的具体用法?PHP lang::init怎么用?PHP lang::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lang
的用法示例。
在下文中一共展示了lang::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
$htaccess[] = "";
}
$filesystem->file_put_contents('.htaccess', implode("\r\n", $htaccess));
}
$breadcrumb = new breadcrumb();
$breadcrumb->Add($config['fname'], 'index.php');
$phpdoc = new OutputDoc($config['gzip']);
$phpdoc->Start($config['gzcompression']);
define('PAGE_IS_GZIPPED', $config['gzip'] == 1 && $phpdoc->Encoding());
($code = $plugins->load('frontend_init')) ? eval($code) : null;
// Global and important functions (not for cron and external)
if (defined('TEMPNOFUNCINIT') == false || $config['foffline'] && defined('TEMPSHOWLOG') == false) {
define('SCRIPT_START_TIME', benchmarktime());
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
$slog->checkBan();
}
if ($config['foffline'] && defined('TEMPSHOWLOG') == false) {
$my->p = $slog->Permissions();
if ($my->p['admin'] != 1) {
$offline = file_get_contents('data/offline.php');
sendStatusCode(503, 3600);
($code = $plugins->load('frontend_init_offline')) ? eval($code) : null;
echo $tpl->parse("offline");
$phpdoc->Out();
$db->close();
exit;
}
}
示例2: head
}
$db->query("DELETE FROM {$db->pre}bbcode WHERE id = '{$id}' LIMIT 1", __LINE__, __FILE__);
$delobj = $scache->load('custombb');
$delobj->delete();
ok('admin.php?action=bbcodes&job=custombb', 'Custom BB Code successfully deleted');
}
elseif ($job == 'custombb_test') {
echo head();
// reader-Tag not recognized
$file = 'admin/data/bbcode_test.php';
$test = $gpc->get('test', none);
$parsed_test = null;
if (!empty($test)) {
file_put_contents($file, $test);
$lang = new lang(false, E_USER_WARNING);
$lang->init();
BBProfile($bbcode);
$bbcode->setSmileys(1);
$bbcode->setReplace(0);
$bbcode->setAuthor($my->id);
$parsed_test = $bbcode->parse($test);
$smileys_time = round($bbcode->getBenchmark('smileys'), 3);
$bbcode_time = round($bbcode->getBenchmark(), 3);
}
else {
$test = file_get_contents($file);
}
if (!empty($parsed_test)) {
?>
<table align="center" class="border">
<tr><td class="obox">Parsing Results</td></tr>