當前位置: 首頁>>代碼示例>>PHP>>正文


PHP lang::init方法代碼示例

本文整理匯總了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;
    }
}
開發者ID:BackupTheBerlios,項目名稱:viscacha-svn,代碼行數:31,代碼來源:function.frontend_init.php

示例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>
開發者ID:BackupTheBerlios,項目名稱:viscacha-svn,代碼行數:31,代碼來源:bbcodes.php


注:本文中的lang::init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。