瀏覽代碼

Fix detection of Windows-based server environments

Daniel Rudolf 8 年之前
父節點
當前提交
a2d0d745ff
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 1
      lib/Pico.php

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Released: -
 ```
 * [Changed] Improve documentation
 * [Fixed] Improve hostname detection with proxies
+* [Fixed] Fix detection of Windows-based server environments
 ```
 
 ### Version 1.0.4

+ 1 - 1
lib/Pico.php

@@ -1371,7 +1371,7 @@ class Pico
      */
     public function getAbsolutePath($path)
     {
-        if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
+        if (DIRECTORY_SEPARATOR === '\\') {
             if (preg_match('/^([a-zA-Z]:\\\\|\\\\\\\\)/', $path) !== 1) {
                 $path = $this->getRootDir() . $path;
             }