PHP Classes

File: example/example.php

Recommend this page to a friend!
  Classes of Axel Hahn   Debug and measure actions   example/example.php   Download  
File: example/example.php
Role: Example script
Content type: text/plain
Description: Example to mesaure your actions
Class: Debug and measure actions
Log and render current script actions
Author: By
Last change:
Date: 8 years ago
Size: 608 bytes


Class file image Download
require '../classes/logger.class.php';
$oLog = new logger();
$bIsDevelopEnvironment = true;

$oLog->add("info ... all GET params: <pre>" . print_r($_GET,1) . "</pre>");
$oLog->add("info ... all POST params: <pre>" . print_r($_POST,1) . "</pre>");

$oLog->add("start db request");
$sSql='select id, label, description from mytable;';
// ... make your query
$oLog->add("sql query finished: " . $sSql);

$oLog->add("description of action");
// ... do something

$oLog->add("description of another action");
// ... do something else

if ($bIsDevelopEnvironment){