/include/configINC.php

Description

configINC.php stores site-wide configuration settings & functions

Stores data like support email address, SUPPORTEMAIL and functions like my_error_handler() which over-rides the default error handler of PHP.

Constants
SUPPORTEMAIL = 'horsey01@example.com' (line 22)

email of site support

Variables
boolean $HideAllErrors (line 28)

If true, will over-ride page specific MyDebug, and make private all errors

Functions
createErrorCode (line 96)

Create an error code out of the file name and line number of our error

Will make upper case, strip out the vowels and create an error of the file name (minus extension & vowels) + "x" + line number of error

Example: CNFGNCx41

The above would be the example for this file, plus an error at line 41 This allows a user to report an error that identifies it, without compromising site security

string createErrorCode (string $myfile, string $myline)
  • string $myfile: file name provided by PHP error handler
  • string $myline: line number of error provided by PHP error handler
my_error_handler (line 57)

Overrides PHP's default error handler

Inherits error info from default handler and allows us to display custom error messages if these global booleans are both true:

  1. $HideAllErrors
  2. $HidePageErrors
The first comes from this file, the second must be in the calling page

  • todo: error logging, or emailing admin not implemented
void my_error_handler (string $e_number, string $e_message, string $e_file, string $e_line, array $e_vars)
  • string $e_number: error number provided by PHP error handler
  • string $e_message: error message provided by PHP error handler
  • string $e_file: file name provided by PHP error handler
  • string $e_line: line number of error provided by PHP error handler
  • array $e_vars: variables present at time of error
printUserError (line 123)

Print a customized public error message

Will use a custom error code created by calling createErrorCode() function, and display to user

Example: CNFGNCx41

The above would be the example for this file, plus an error at line 41 This allows a user to report an error that identifies it, without compromising site security

void printUserError (string $myfile, string $myline)
  • string $myfile: file name provided by PHP error handler
  • string $myline: line number of error provided by PHP error handler

Documentation generated on Sat, 03 May 2008 19:47:45 -0700 by phpDocumentor 1.4.1