summaryrefslogtreecommitdiff
path: root/bin/debug.php
blob: dd24d5f5e4f93d83856d5ce041f19ef343b27448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
}

?>