Provide debug information on demand
authorJoey Schulze <joey@infodrom.org>
Wed, 20 Jan 2010 12:32:13 +0000 (13:32 +0100)
committerJoey Schulze <joey@infodrom.org>
Wed, 20 Jan 2010 12:32:13 +0000 (13:32 +0100)
lib/general.php

index f088db0..279b701 100644 (file)
@@ -55,4 +55,13 @@ function process()
   return $ret;
 }
 
+function debug_info()
+{
+  $html = '<div style="background: #DDD; margin: 5px; padding-left: 4px; border: 1px solid #AAA;clear:both;">';
+  $html .= "\n<pre>\n\$_SESSION = " . var_export($_SESSION,true) . "\n";
+  $html .= "\n\$_COOKIE = " . var_export($_COOKIE,true) . "\n</pre>\n";
+  $html .= '</div>';
+  return $html;
+}
+
 ?>