本文整理匯總了PHP中core_shutdown_manager::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP core_shutdown_manager::initialize方法的具體用法?PHP core_shutdown_manager::initialize怎麽用?PHP core_shutdown_manager::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類core_shutdown_manager
的用法示例。
在下文中一共展示了core_shutdown_manager::initialize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ini_set
if (NO_DEBUG_DISPLAY) {
// Some parts of Moodle cannot display errors and debug at all.
ini_set('display_errors', '0');
ini_set('log_errors', '1');
} else {
if (empty($CFG->debugdisplay)) {
ini_set('display_errors', '0');
ini_set('log_errors', '1');
} else {
// This is very problematic in XHTML strict mode!
ini_set('display_errors', '1');
}
}
}
// Register our shutdown manager, do NOT use register_shutdown_function().
core_shutdown_manager::initialize();
// Verify upgrade is not running unless we are in a script that needs to execute in any case
if (!defined('NO_UPGRADE_CHECK') and isset($CFG->upgraderunning)) {
if ($CFG->upgraderunning < time()) {
unset_config('upgraderunning');
} else {
print_error('upgraderunning');
}
}
// Turn on SQL logging if required
if (!empty($CFG->logsql)) {
$DB->set_logging(true);
}
// enable circular reference collector in PHP 5.3,
// it helps a lot when using large complex OOP structures such as in amos or gradebook
if (function_exists('gc_enable')) {