本文整理汇总了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";
示例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";