DB类host=$host; $this->user=$user; $this->pass=$pass; $this->data=$data; $this->conn=$conn; $this->code=$code; $this->connect(); } public function __get($name){return $this->$name;} public function __set($name,$value){$this->$
本文实例讲述了php实现的错误处理封装类。分享给大家供大家参考,具体如下:
1、创建MyErrorHandler.php文件
代码如下:
<?php
class MyErrorHandler {
public $message;
public $filename;
public $line;
public $vars = array();
protected $_noticeLog = 'F:\root\noticeLog.log';
public functio