mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正File缓存驱动
This commit is contained in:
6
library/think/cache/driver/File.php
vendored
6
library/think/cache/driver/File.php
vendored
@@ -38,8 +38,8 @@ class File
|
|||||||
if (!empty($options)) {
|
if (!empty($options)) {
|
||||||
$this->options = array_merge($this->options, $options);
|
$this->options = array_merge($this->options, $options);
|
||||||
}
|
}
|
||||||
if (substr($this->options['path'], -1) != '/') {
|
if (substr($this->options['path'], -1) != DS) {
|
||||||
$this->options['path'] .= '/';
|
$this->options['path'] .= DS;
|
||||||
}
|
}
|
||||||
$this->init();
|
$this->init();
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ class File
|
|||||||
$dir = '';
|
$dir = '';
|
||||||
$len = $this->options['path_level'];
|
$len = $this->options['path_level'];
|
||||||
for ($i = 0; $i < $len; $i++) {
|
for ($i = 0; $i < $len; $i++) {
|
||||||
$dir .= $name{$i} . '/';
|
$dir .= $name{$i} . DS;
|
||||||
}
|
}
|
||||||
if (!is_dir($this->options['path'] . $dir)) {
|
if (!is_dir($this->options['path'] . $dir)) {
|
||||||
mkdir($this->options['path'] . $dir, 0755, true);
|
mkdir($this->options['path'] . $dir, 0755, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user