blob: cc8cf1224e053ea03da334eb156d9e87bfd40c99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
namespace phinde;
class Log
{
public static function error($msg)
{
static::log($msg);
}
public static function info($msg)
{
if ($GLOBALS['phinde']['debug']) {
static::log($msg);
}
}
public static function log($msg)
{
if (isset($GLOBALS['phinde']['logfile'])
&& $GLOBALS['phinde']['logfile'] != ''
) {
file_put_contents(
$GLOBALS['phinde']['logfile'],
$msg . "\n", FILE_APPEND
);
} else {
echo $msg . "\n";
}
}
}
?>
|