本文整理汇总了PHP中I2CE::ob_level方法的典型用法代码示例。如果您正苦于以下问题:PHP I2CE::ob_level方法的具体用法?PHP I2CE::ob_level怎么用?PHP I2CE::ob_level使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类I2CE
的用法示例。
在下文中一共展示了I2CE::ob_level方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeDSN
//.........这里部分代码省略.........
$mdb2 = new MDB2();
$dsn_info = $mdb2->parseDSN($dsn);
if (I2CE_Dumper::dumpStaticURL($dsn_info['database'], 'file')) {
exit;
}
if (!self::dbConnect($dsn_info)) {
self::raiseError("Could not connect to the database");
if (!array_key_exists('HTTP_HOST', $_SERVER)) {
//command line
exit(13);
} else {
return false;
}
}
self::setupSession();
$clear = false;
if (!array_key_exists('HTTP_HOST', $_SERVER)) {
//command line
$clear = self::getRuntimeVariable('clear_cache', '0');
} else {
$URL = self::getAccessedBaseURL(false) . 'clear_cache.php';
$clear = substr($_SERVER['REQUEST_URI'], 0, strlen($URL)) == $URL;
}
if ($clear) {
$config = self::setupMagicData();
$config->setIfIsSet(self::$email, "/I2CE/feedback/to");
session_destroy();
if (function_exists('apc_clear_cache')) {
apc_clear_cache('user');
I2CE::raiseError("Cleared APC User Cache");
}
I2CE::raiseError("Session destroyed");
I2CE::getConfig()->clearCache();
I2CE::raiseError("Magic data cleared -- Execution stopping");
die(0);
}
$update = false;
if (!array_key_exists('HTTP_HOST', $_SERVER)) {
//command line
$update = self::getRuntimeVariable('update', '0');
} else {
$URL = self::getAccessedBaseURL(false) . 'update.php';
$update = substr($_SERVER['REQUEST_URI'], 0, strlen($URL)) == $URL;
}
if (self::siteInitialized()) {
self::raiseError("Already initialized!", E_USER_WARNING);
return true;
}
$db = MDB2::singleton();
//get the instance we just created.
if (!$update && $bring_up_system) {
// just assume it is until we know otherwise. This error
// message to don't dumped to the screen.
self::siteInitialized(true);
}
/*
if (I2CE_Dumper::dumpStaticURL($db->database_name, 'file')) {
exit();
}
*/
I2CE_Error::resetStoredMessages();
if (empty($site_module_file)) {
self::raiseError("Please set the site module's config file", E_USER_ERROR);
if (!array_key_exists('HTTP_HOST', $_SERVER)) {
//command line
exit(14);
} else {
return false;
}
}
$config = self::setupMagicData();
$config->setIfIsSet(self::$email, "/I2CE/feedback/to");
$site_module_file = I2CE_FileSearch::absolut($site_module_file, 1);
self::setupFileSearch(array('MODULES' => array(dirname(dirname(__FILE__)), dirname($site_module_file)), 'CLASSES' => dirname(__FILE__)));
self::setUserAccessInit($user_access_init, null, true);
if ($update) {
require_once 'I2CE_Updater.php';
if (!I2CE_Updater::updateSite($site_module_file)) {
if (array_key_exists('HTTP_HOST', $_SERVER)) {
die("<br/>Could not update site");
} else {
I2CE::raiseError("\nCould not update site\n");
exit(15);
}
} else {
if (!array_key_exists('HTTP_HOST', $_SERVER)) {
//command line
exit(0);
}
}
return true;
} else {
if ($bring_up_system && !self::bringUpSystem($site_module_file)) {
self::raiseError("Could not bring up system", E_USER_ERROR);
exit(15);
}
I2CE::$ob_level = ob_get_level();
return true;
}
}