summaryrefslogtreecommitdiff
path: root/bin/debug.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/debug.php')
-rwxr-xr-xbin/debug.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/debug.php b/bin/debug.php
new file mode 100755
index 0000000..dd24d5f
--- /dev/null
+++ b/bin/debug.php
@@ -0,0 +1,19 @@
+<?php
+function addlog($log)
+{
+ global $debug, $debugfile;
+
+ if (!$debug)
+ return ;
+
+ $newlog = date("[Y/m/d H:i:s] ") .$log ."\n";
+
+ $debughandle = fopen($debugfile, 'a');
+ if (!$debughandle)
+ return;
+ fwrite($debughandle, $newlog);
+
+ fclose($debughandle);
+}
+
+?>