diff --git a/library/think/cache/driver/File.php b/library/think/cache/driver/File.php index 53a5ded6..29cd3773 100644 --- a/library/think/cache/driver/File.php +++ b/library/think/cache/driver/File.php @@ -38,8 +38,8 @@ class File if (!empty($options)) { $this->options = array_merge($this->options, $options); } - if (substr($this->options['path'], -1) != '/') { - $this->options['path'] .= '/'; + if (substr($this->options['path'], -1) != DS) { + $this->options['path'] .= DS; } $this->init(); } @@ -74,7 +74,7 @@ class File $dir = ''; $len = $this->options['path_level']; for ($i = 0; $i < $len; $i++) { - $dir .= $name{$i} . '/'; + $dir .= $name{$i} . DS; } if (!is_dir($this->options['path'] . $dir)) { mkdir($this->options['path'] . $dir, 0755, true);