diff --git a/library/think/log/driver/File.php b/library/think/log/driver/File.php index 89eb000a..5f0c8e2a 100644 --- a/library/think/log/driver/File.php +++ b/library/think/log/driver/File.php @@ -71,7 +71,8 @@ class File $server = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '0.0.0.0'; $remote = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'; - error_log("[{$now}] {$server} {$remote} {$_SERVER['REQUEST_URI']}\r\n{$info}\r\n", 3, $destination); + $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; + error_log("[{$now}] {$server} {$remote} {$uri}\r\n{$info}\r\n", 3, $destination); } }