本文整理汇总了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')) {