00024 {
00025 $errorFile =
TM_PATH . 'log/errors.log';
00026
if (!is_writable($errorFile)) {
00027
return;
00028 }
00029
$file = fopen($errorFile,
'a');
00030
if (!
$file) {
00031
return;
00032 }
00033 $time = time();
00034 $who =
" ";
00035
if (!empty($_SERVER['REMOTE_ADDR'])) {
00036 $who = $_SERVER['REMOTE_ADDR'];
00037 }
00038 $ua =
" ";
00039
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
00040 $ua = $_SERVER[
"HTTP_USER_AGENT"];
00041 }
00042 $request =
" ";
00043
if (!empty($_SERVER['REQUEST_URI'])) {
00044 $request = $_SERVER['REQUEST_URI'];
00045 }
00046 $ref =
" ";
00047
if (!empty($_SERVER['HTTP_REFERER'])) {
00048 $ref = $_SERVER['HTTP_REFERER'];
00049 }
00050 $error = $code
00051 .
"§"
00052 . $time
00053 .
"§"
00054 . $request
00055 .
"§"
00056 . $short
00057 .
"§"
00058 . $long
00059 .
"§"
00060 . $who
00061 .
"§"
00062 . $ua
00063 .
"§"
00064 . $ref
00065 .
"\n";
00066 fwrite($file, $error);
00067 fclose($file);
00068
return;
00069 }