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


PHP ET::loadConfig方法代碼示例

本文整理匯總了PHP中ET::loadConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP ET::loadConfig方法的具體用法?PHP ET::loadConfig怎麽用?PHP ET::loadConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ET的用法示例。


在下文中一共展示了ET::loadConfig方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array_map

if (get_magic_quotes_gpc()) {
    $_REQUEST = array_map("undoMagicQuotes", $_REQUEST);
    $_GET = array_map("undoMagicQuotes", $_GET);
    $_POST = array_map("undoMagicQuotes", $_POST);
    $_COOKIE = array_map("undoMagicQuotes", $_COOKIE);
}
//***** 2. INCLUDE CONFIGURATION
// Include our config files.
ET::loadConfig(PATH_CORE . "/config.defaults.php");
// If the config path is different from the default, but there's still a config file at the default location, include it.
if (PATH_CONFIG != PATH_ROOT . "/config" and file_exists($file = PATH_ROOT . "/config/config.php")) {
    ET::loadConfig($file);
}
// Include the real config file.
if (file_exists($file = PATH_CONFIG . "/config.php")) {
    ET::loadConfig($file);
}
// In debug mode, show all errors (except for strict standards).
if (C("esoTalk.debug")) {
    error_reporting(E_ALL & ~E_STRICT);
}
// Do we want to force HTTPS?
if (C("esoTalk.https") and (!array_key_exists("HTTPS", $_SERVER) or $_SERVER["HTTPS"] != "on")) {
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit;
}
// Load the forum's default language. We will load the user's preferred language later on.
ET::loadLanguage(C("esoTalk.language"));
//***** 3. REQUIRE AND REGISTER ESSENTIAL CLASSES
// Require base classes that may be extended.
require PATH_LIBRARY . "/ETFactory.class.php";
開發者ID:19eighties,項目名稱:esoTalk,代碼行數:31,代碼來源:bootstrap.php

示例2: array_map

if (get_magic_quotes_gpc()) {
    $_REQUEST = array_map("undoMagicQuotes", $_REQUEST);
    $_GET = array_map("undoMagicQuotes", $_GET);
    $_POST = array_map("undoMagicQuotes", $_POST);
    $_COOKIE = array_map("undoMagicQuotes", $_COOKIE);
}
//***** 2. INCLUDE CONFIGURATION
// Include our config files.
ET::loadConfig(PATH_CORE . "/config.defaults.php");
// If the config path is different from the default, but there's still a config file at the default location, include it.
if (PATH_CONFIG != PATH_ROOT . "/config" and is_file($file = PATH_ROOT . "/config/config.php")) {
    ET::loadConfig($file);
}
// Include the real config file.
//if (file_exists($file = PATH_CONFIG."/config.php")) ET::loadConfig($file);
ET::loadConfig(PATH_CONFIG . "/config.php");
// In debug mode, show all errors (except for strict standards).
if (C("esoTalk.debug")) {
    error_reporting(E_ALL & ~E_STRICT);
}
// Do we want to force HTTPS?
if (C("esoTalk.https") and (!array_key_exists("HTTPS", $_SERVER) or $_SERVER["HTTPS"] != "on")) {
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit;
}
// Load the forum's default language. We will load the user's preferred language later on.
//ET::loadLanguage(C("esoTalk.language"));
//***** 3. REQUIRE AND REGISTER ESSENTIAL CLASSES
// Require base classes that may be extended.
require PATH_LIBRARY . "/ETFactory.class.php";
require PATH_LIBRARY . "/ETPluggable.class.php";
開發者ID:ky0ncheng,項目名稱:esotalk-for-sae,代碼行數:31,代碼來源:bootstrap.php


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