小编tle*_*leb的帖子

Codeigniter中的set_error_handler?

我已经创建了一些助手来捕获任何PPH错误,然后发送一个curl post,它将使用我的bug跟踪软件创建一个票证.

但我无法与Codeigniter合作.这是我的代码:


<? function phpErrorHandler($errno, $errstr, $errfile, $errline, $errcontext){

    //If is a notice do nothing.
    if($errno == E_NOTICE | $errno == E_USER_NOTICE): null; else:

    //Error types
    $errortype = array(
      E_ERROR           => 'Error',
      E_WARNING         => 'Warning',
      E_PARSE           => 'Parsing Error',
      E_NOTICE          => 'Notice',
      E_CORE_ERROR      => 'Core Error',
      E_CORE_WARNING    => 'Core Warning',
      E_COMPILE_ERROR   => 'Compile Error',
      E_COMPILE_WARNING => 'Compile Warning',
      E_USER_ERROR      => 'User Error',
      E_USER_WARNING    => 'User Warning',
      E_USER_NOTICE     => 'User Notice',
      E_STRICT          => "Runtime Notice");

    //Just get the filename for …
Run Code Online (Sandbox Code Playgroud)

php oop error-handling codeigniter

5
推荐指数
1
解决办法
3896
查看次数

标签 统计

codeigniter ×1

error-handling ×1

oop ×1

php ×1