summaryrefslogtreecommitdiff
path: root/bin/debug.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-27 19:46:30 +0100
committerTheTroll <trolldev@gmail.com>2010-03-27 19:46:30 +0100
commit275c3cd3d4532aa927945a940bb9c5b8304ba365 (patch)
tree1028da611e16c72bca64a46935cff7e42fe627bf /bin/debug.php
parent4241ab5e4b0d7a1a0165175c1067ac22edd76de8 (diff)
downloadistreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.gz
istreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.bz2
Added debug 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);
+}
+
+?>