PHP Classes

File: Samples/sample-file.php

Recommend this page to a friend!
  Classes of mohammadjafar mashhadi   Error Logger Class   Samples/sample-file.php   Download  
File: Samples/sample-file.php
Role: Example script
Content type: text/plain
Description: Sample - File logging
Class: Error Logger Class
Log error messages to files
Author: By
Last change:
Date: 14 years ago
Size: 687 bytes
 

Contents

Class file image Download
<?php
#########################################################################
#### An example for Error Logger Class ####
#########################################################################

include "../ErrorLogger.class.php";$err = new ErrorLogger;

$err->__set("logtype", 4);
$err->__set("lfname", "./Errorlogs.err");
$err->__set("fotype", "Append");

$err->__set("errorpattern", "<strong>ERROR:</strong> " . date("d F Y H:i") . " : %s");

$err->ErrorLoggerInit();

$err->add_message("HELLO WORLD!");
$err->add_message("THIS IS AN ERROR!!");
$err->add_message("<center><h3>raindigital2007 [at] gmail [dot] com</h3></center>");
?>