return $r; }else{ return false; } } //block获取数据表缓存 public function get_block_data_cache($k = ''){ $r = $this->get($k); if($r){ return $r; }else{ return false; } } //设置文件缓存 public function setFileCache($key = '', $data = array(), $life = 600){ $datas = array( 'datas' => serialize($data), 'time' => $_ENV['_time']+$life ); $cacheFile = RUNTIME_PATH.'filecache/' . $key . '.cache'; return FW($cacheFile, _json_encode($datas)); } //读取文件缓存 public function getFileCache($key = ''){ $cacheFile = RUNTIME_PATH.'filecache/'. $key . '.cache'; if ( !is_file($cacheFile) ) { return array(); } $cacheFile_str = file_get_contents($cacheFile); $cache_datas_arr = _json_decode($cacheFile_str); if( empty($cache_datas_arr) || $cache_datas_arr['time'] < $_ENV['_time'] ){ @unlink($cacheFile); return array(); } if( isset($cache_datas_arr['datas']) ){ $datas = unserialize($cache_datas_arr['datas']); }else{ $datas = array(); } return $datas; } //清除缓存(可选 数据表缓存、文件缓存、或者两者) public function clear_cache($type = 'all'){ if($type == 'all'){ $this->truncate(); $this->clear_filecache(); }elseif ($type == 'db'){ $this->truncate(); }elseif ($type == 'file'){ $this->clear_filecache(); } return true; } //清除文件缓存 public function clear_filecache(){ $_lecms = RUNTIME_PATH.'_lecms.php'; is_file($_lecms) && unlink($_lecms); $tpmdir = array('_control', '_model', '_view'); foreach($tpmdir as $dir) { _rmdir(RUNTIME_PATH.APP_NAME.$dir); defined('F_APP_NAME') && _rmdir(RUNTIME_PATH.F_APP_NAME.$dir); } //清除语言包缓存 _rmdir(RUNTIME_PATH.'core_lang'); _rmdir(RUNTIME_PATH.'lang'); //清除文件缓存文件夹 _rmdir(RUNTIME_PATH.'filecache'); //清除自定义函数库文件缓存 $_misc = RUNTIME_PATH.'misc.func.php'; is_file($_misc) && unlink($_misc); return true; } } Lecms 3.0.3 错误

错误信息

错误位置

基本信息

程序流程

SQL

$_GET

$_POST

$_COOKIE

包含文件

其他信息