From 8dcb724ec33d2247c9f8f85efe6462c9c5db0d82 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 6 Jul 2016 10:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3File=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);