PHP Classes

File: test-error.php

Recommend this page to a friend!
  Classes of Frank Mullenger   Error Handler Class   test-error.php   Download  
File: test-error.php
Role: Example script
Content type: text/plain
Description: Error handler test
Class: Error Handler Class
Handle PHP scripts execution errors
Author: By
Last change:
Date: 17 years ago
Size: 470 bytes
 

Contents

Class file image Download
<?
   
//setting error reporting to off appears to be optional...
    //error_reporting(0);
    //ini_set('display_errors','0');

   
include("/home/username/global/class.error_handler.php");
   
$handler = new error_handler("127.0.0.1",1,6,NULL,'/home/username/global/error_logs/test.com.txt');

   
   
set_error_handler(array(&$handler, "handler"));

   
//testing...
    // undefined constant, generates a notice
   
$t = I_AM_NOT_DEFINED;
   
   
//generates a warning
   
$v = 7/0;
?>