mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
配置文件调整
控制器类的ajaxReturn方法调整
This commit is contained in:
14
library/think/cache/driver/file.php
vendored
14
library/think/cache/driver/file.php
vendored
@@ -23,7 +23,7 @@ class File {
|
||||
'path_level' => 1,
|
||||
'prefix' => '',
|
||||
'length' => 0,
|
||||
'temp' => '',
|
||||
'path' => '',
|
||||
'data_compress' => false,
|
||||
];
|
||||
|
||||
@@ -35,7 +35,7 @@ class File {
|
||||
if(!empty($options)) {
|
||||
$this->options = array_merge($this->options,$options);
|
||||
}
|
||||
if(substr($this->options['temp'], -1) != '/') $this->options['temp'] .= '/';
|
||||
if(substr($this->options['path'], -1) != '/') $this->options['path'] .= '/';
|
||||
$this->init();
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ class File {
|
||||
*/
|
||||
private function init() {
|
||||
// 创建项目缓存目录
|
||||
if (!is_dir($this->options['temp'])) {
|
||||
if (! mkdir($this->options['temp'],0755))
|
||||
if (!is_dir($this->options['path'])) {
|
||||
if (! mkdir($this->options['path'],0755))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -67,14 +67,14 @@ class File {
|
||||
for($i=0;$i<$len;$i++) {
|
||||
$dir .= $name{$i}.'/';
|
||||
}
|
||||
if(!is_dir($this->options['temp'].$dir)) {
|
||||
mkdir($this->options['temp'].$dir,0755,true);
|
||||
if(!is_dir($this->options['path'].$dir)) {
|
||||
mkdir($this->options['path'].$dir,0755,true);
|
||||
}
|
||||
$filename = $dir.$this->options['prefix'].$name.'.php';
|
||||
}else{
|
||||
$filename = $this->options['prefix'].$name.'.php';
|
||||
}
|
||||
return $this->options['temp'].$filename;
|
||||
return $this->options['path'].$filename;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
6
library/think/cache/driver/secache.php
vendored
6
library/think/cache/driver/secache.php
vendored
@@ -20,7 +20,7 @@ class Secache {
|
||||
protected $handler = null;
|
||||
protected $options = [
|
||||
'project' => '',
|
||||
'temp' => '',
|
||||
'path' => '',
|
||||
'expire' => 0,
|
||||
'prefix' => '',
|
||||
'length' => 0,
|
||||
@@ -35,9 +35,9 @@ class Secache {
|
||||
if(!empty($options)) {
|
||||
$this->options = array_merge($this->options,$options);
|
||||
}
|
||||
if(substr($this->options['temp'], -1) != '/') $this->options['temp'] .= '/';
|
||||
if(substr($this->options['path'], -1) != '/') $this->options['path'] .= '/';
|
||||
$this->handler = new SecacheClient;
|
||||
$this->handler->workat($this->options['temp'].$this->options['project']);
|
||||
$this->handler->workat($this->options['path'].$this->options['project']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
6
library/think/cache/driver/simple.php
vendored
6
library/think/cache/driver/simple.php
vendored
@@ -19,7 +19,7 @@ class Simple {
|
||||
|
||||
protected $options = [
|
||||
'prefix' => '',
|
||||
'temp' => '',
|
||||
'path' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ class Simple {
|
||||
if(!empty($options)) {
|
||||
$this->options = array_merge($this->options,$options);
|
||||
}
|
||||
if(substr($this->options['temp'], -1) != '/') $this->options['temp'] .= '/';
|
||||
if(substr($this->options['path'], -1) != '/') $this->options['path'] .= '/';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ class Simple {
|
||||
* @return string
|
||||
*/
|
||||
private function filename($name) {
|
||||
return $this->options['temp'].$this->options['prefix'].md5($name).'.php';
|
||||
return $this->options['path'].$this->options['prefix'].md5($name).'.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user