本文整理匯總了PHP中ET::database方法的典型用法代碼示例。如果您正苦於以下問題:PHP ET::database方法的具體用法?PHP ET::database怎麽用?PHP ET::database使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ET
的用法示例。
在下文中一共展示了ET::database方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: C
include_once $file;
}
$className = "ETPlugin_{$v}";
if (!class_exists($className)) {
continue;
}
ET::$plugins[$v] = new $className("addons/plugins/" . $v);
ET::$plugins[$v]->boot();
}
}
//***** 6. INITIALIZE SESSION AND DATABASE, AND CACHE
// Initialize the cache.
$cacheClass = C("esoTalk.cache");
ET::$cache = ETFactory::make($cacheClass ? $cacheClass : "cache");
// Connect to the database.
ET::$database = ETFactory::make("database");
ET::$database->init(C("esoTalk.database.host"), C("esoTalk.database.user"), C("esoTalk.database.password"), C("esoTalk.database.dbName"), C("esoTalk.database.prefix"), C("esoTalk.database.connectionOptions"), C("esoTalk.database.port"));
// Initialize the session.
ET::$session = ETFactory::make("session");
// Check if any plugins need upgrading by comparing the versions in ET::$pluginInfo with the versions in
// ET::$config.
foreach (ET::$plugins as $k => $v) {
if (C("{$k}.version") != ET::$pluginInfo[$k]["version"]) {
if ($v->setup(C("{$k}.version"))) {
ET::writeConfig(array("{$k}.version" => ET::$pluginInfo[$k]["version"]));
}
}
}
//***** 7. PARSE REQUEST
// If $_GET["p"] was explicitly specified, use that.
if (!empty($_GET["p"])) {