Source for file sl_debug.php
Documentation is available at sl_debug.php
* Activates or deactivates debug mode, depending on a request parameter.
* @copyright Copyright (c) 2007-8 Sloodle (various contributors)
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @contributor Peter R. Bloomfield
// Define the name of the debug mode parameter
define('SLOODLE_DEBUG_MODE_PARAM_NAME', 'sloodledebug');
// Should debug mode be activated? Check for typical values, such as "true", "yes", "ok" and "1"
if (isset
($_dbg) &&
!empty($_dbg) &&
($_dbg[0] ==
't' ||
$_dbg ==
'ok' ||
$_dbg ==
'on' ||
$_dbg[0] ==
'y' || (int)
$_dbg !=
0)) {
define('SLOODLE_DEBUG', TRUE);
// Enable PHP error display and full reporting level
define('SLOODLE_DEBUG', FALSE);
// Disable PHP error display
// Note that the error reporting level is not changed here -- this is to ensure that the error log is still written to
// Sloodle debug output function
// Will echo the given string to the HTTP response if Sloodle debug mode is active
Documentation generated on Tue, 04 Mar 2008 15:08:38 +0000 by phpDocumentor 1.4.0