首页 > PHP教程 > PHP应用 > 正文:学习动态网页技术PHP中错误处理的一些方法

学习动态网页技术PHP中错误处理的一些方法

web学习吧 2007-09-19 来源: 收藏本文
共7页: 上一页 [1] [2] [3] [4] 5 [6] [7] 下一页 error_reporting(1048);
class ErrorHandlers extends Exception{
    private $_context = null;
    function  __construct($level,  $string,  $file,  $line,  $context=null){  
        parent::__construct($string,$level);  
        $this->file  =  $file;    
        $this->line  =  $line;  
        $this->_level  =  $level;  
        $this->_context  =  $context;
    }
    function __destruct(){
//        parent::__destruct();
    }
    function Message(){
           $errors = 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',

共7页: 上一页 [1] [2] [3] [4] 5 [6] [7] 下一页
热点教程
实用信息推荐
网站地图 - 最新教程 - RSS订阅 - 版权所有 - 广告服务 - 友情连接 - 联系我们