修正File缓存驱动

This commit is contained in:
thinkphp
2016-07-06 10:14:58 +08:00
parent 350b1bda1a
commit 8dcb724ec3

View File

@@ -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);