本文整理汇总了PHP中_error_handler函数的典型用法代码示例。如果您正苦于以下问题:PHP _error_handler函数的具体用法?PHP _error_handler怎么用?PHP _error_handler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_error_handler函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _shutdown_handler
/**
* Shutdown Handler
* 停止程序句柄
*
* This is the shutdown handler that is declared at the top
* of CodeIgniter.php. The main reason we use this is to simulate
* a complete custom exception handler.
*
* E_STRICT is purposively neglected because such events may have
* been caught. Duplication or none? None is preferred for now.
*
* @link http://insomanic.me.uk/post/229851073/php-trick-catching-fatal-errors-e-error-with-a
* @return void
*/
function _shutdown_handler()
{
$last_error = error_get_last();
if (isset($last_error) && $last_error['type'] & (E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)) {
_error_handler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);
}
}
示例2: define
define("G_TEMPLATES_IMAGE", G_TEMPLATES_PATH . '/' . G_STYLE . '/images');
/*
*---------------------------------------------------------------
* INCLUDE GLOBAL FUNCTION
*---------------------------------------------------------------
*
*/
System::load_sys_fun('global');
/*
*---------------------------------------------------------------
* error set
*---------------------------------------------------------------
*
*/
if (System::load_sys_config('system', 'error')) {
_error_handler();
}
/*
*---------------------------------------------------------------
* timezone set
*---------------------------------------------------------------
*
*/
function_exists('date_default_timezone_set') && date_default_timezone_set(System::load_sys_config('system', 'timezone'));
/**
*
*
*
*/
/**
* WEB_INFO