function debug($var)
{
    $traces = debug_backtrace();
    $places = array();
    foreach ($traces as $trace) {
        $places[] = str_replace(array(DIR_ROOT, '\\'), array('', '/'), $trace['file'] . ':' . $trace['line']);
    }
    $place = str_replace(':', ', line ', array_shift($places));
    $trace = debug_backtrace();
    $trace = array_shift($trace);
    $place = str_replace(array(DIR_ROOT, '\\'), array('', '/'), $trace['file'] . ', line ' . $trace['line']);
    $vars = array();
    foreach (func_get_args() as $var) {
        $vars[] = nl2br(toString($var));
    }
    $places = join(" ", $places);
    print system_window("<u>DEBUG</u> at <span title=\"{$places}\">{$place}</span>", $vars, '#CDE');
    return true;
}
Beispiel #2
0
 public static function output($title, $msg, $color = '#994')
 {
     print system_window($title, $msg, $color);
 }