PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Matthew Daniel   PHP Register Globals Logger   ???   Download  
File: ???
Role: Example script
Content type: text/plain
Description: example usage of global logger
Class: PHP Register Globals Logger
Log the usage of registered global variables
Author: By
Last change:
Date: 11 years ago
Size: 425 bytes
 

Contents

Class file image Download
<?php

/**
 * To use just include this at the very beginning of each script.
 * replace the interior of the function with whatever type of logging
 * that you intend to use; I use sentry in this example.
**/
globalLogger::initialize(function ($varname, $value, $file) {
    if (
function_exists('silentSentryError'))
    {
       
silentSentryError("{$varname} registered global usage should be fixed in {$file}.");
    }
});