Login   Register  
PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Maxim  >  Debug system  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Using sample
Class: Debug system
Output debug information to an HTML log
Author: By
Last change:
Date: 6 years ago
Size: 995 bytes


Class file image Download
Foo() {
$Debug->AddMessage(__FILE__.': '.__CLASS__.' -> '.__FUNCTION__);
Some {
MyFunc() {
$Debug->AddMessage(__FILE__.': '.__CLASS__.' -> '.__FUNCTION__);
    Class initialisation:
    first param - folder for saving reports (must be writable)
    second param - save error into file on any error
$Debug = new Debug('log'true);
$var 25;
$Debug->AddMessage('$var'$var); // add to report user message (name and value of variable);
Foo(); // execute function, that add message to report
$x 0// make nonfatal error
$Some = new Some();    
$Some->MyFunc(); // execute function of class, that add message to report
$Debug->End(true); // Debug end (always in the end of script). If true - report saving into file always, if false - report saving into file only in error