diff options
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); +} + +?> |