diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-27 19:46:30 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-27 19:46:30 +0100 |
commit | 275c3cd3d4532aa927945a940bb9c5b8304ba365 (patch) | |
tree | 1028da611e16c72bca64a46935cff7e42fe627bf /bin/debug.php | |
parent | 4241ab5e4b0d7a1a0165175c1067ac22edd76de8 (diff) | |
download | istreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.gz istreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.bz2 |
Added debug mode
Diffstat (limited to 'bin/debug.php')
-rwxr-xr-x | bin/debug.php | 19 |
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); +} + +?> |