AEOS Calvarium v0.5
This commit is contained in:
parent
57b531cb62
commit
1fa8b9e152
177 changed files with 2936 additions and 3386 deletions
30
lib/debug.lib.php
Executable file → Normal file
30
lib/debug.lib.php
Executable file → Normal file
|
|
@ -3,15 +3,25 @@
|
|||
// *****************************************************
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
// Retourne STRING
|
||||
// Retourne sous forme d'arbre l'Array
|
||||
if (!function_exists("view"))
|
||||
{
|
||||
function view($a)
|
||||
{
|
||||
print_r('<pre>');
|
||||
print_r($a);
|
||||
print_r('</pre>');
|
||||
}
|
||||
|
||||
//=== Show an array with pre tag
|
||||
//=== IN: A for what to show [ARRAY FORMAT]
|
||||
//=== OUT: None [ECHO]
|
||||
function view($a)
|
||||
{
|
||||
print_r("<pre>");
|
||||
print_r($a);
|
||||
print_r("</pre>");
|
||||
}
|
||||
|
||||
function debug() {
|
||||
$trace = debug_backtrace();
|
||||
$rootPath = dirname(dirname(__FILE__));
|
||||
$file = str_replace($rootPath, '', $trace[0]['file']);
|
||||
$line = $trace[0]['line'];
|
||||
$var = $trace[0]['args'][0];
|
||||
$lineInfo = sprintf('<div><strong>%s</strong> (line <strong>%s</strong>)</div>', $file, $line);
|
||||
$debugInfo = sprintf('<pre>%s</pre>', print_r($var, true));
|
||||
print_r($lineInfo.$debugInfo);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue