* adjust for saveError.

This commit is contained in:
wyd621
2013-10-30 00:02:15 +00:00
parent 0b4dca130e
commit 1124c73064
+6
View File
@@ -1592,6 +1592,12 @@ class router
$errorLog = "\n" . date('H:i:s') . " $message in <strong>$file</strong> on line <strong>$line</strong> ";
$errorLog .= "when visiting <strong>" . $this->getURI() . "</strong>\n";
$serverAddr = explode('.', $_SERVER['SERVER_ADDR']);
if(!($serverAddr[0] == 10 or ($serverAddr[0] == 172 and $serverAddr[1] >= 16 and $serverAddr[1] <= 131) or ($serverAddr[0] == 192 and $serverAddr[1] == '168')))
{
$errorLog = str_replace($this->getBasePath(), '', $errorLog);
}
/* Save to log file. */
$errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log';
$fh = @fopen($errorFile, 'a');