<?php
require dirname(__FILE__).'/lib/debug.php';
define('DEBUG_DIR', debug_dir());
define('XDEBUG_TRACE_SCRIPT', 'http://localhost'.DEBUG_DIR.'/dev/xdebug-trace.php');
define('XDEBUG_XT_FILE', dirname(__FILE__).'/dev/data/xdebug-trace');
define('DB_DEBUG', 1);
define('DB_DEBUG_SCRIPT', 'http://localhost'.DEBUG_DIR.'/dev/db-debug.php');
define('DB_DEBUG_FILE', dirname(__FILE__).'/dev/data/db-debug.dat');
register_shutdown_function('debug_console', 1);
debug_start();
function debug_dir()
{
$ret = '/debug';
$root = $_SERVER['DOCUMENT_ROOT'];
$dir = dirname(__FILE__);
$root = str_replace('\\', '/', $root);
$dir = str_replace('\\', '/', $dir);
if ('/' == substr($root, -1)) { $root = substr($root, 0, -1); }
$root = preg_replace('#^([a-z])(:[\s\S]+)$#ie', "strtolower('\\1').'\\2'", $root);
$dir = preg_replace('#^([a-z])(:[\s\S]+)$#ie', "strtolower('\\1').'\\2'", $dir);
if ($root == substr($dir, 0, strlen($root))) {
$ret = substr($dir, strlen($root));
}
return $ret;
}
?>