if(isset($website_group_content['theme']) && !empty($website_group_content['theme'])){ $this->data['cfg']['theme'] = $website_group_content['theme']; $this->data['cfg']['tpl'] = $this->data['cfg']['webdir'].'view/'.$this->data['cfg']['theme'].'/'; } //移动端主题和主题路径 if(isset($website_group_content['theme_mobile']) && !empty($website_group_content['theme_mobile']) && $key == 'cfg' && !empty($this->data['cfg']['open_mobile_view']) && is_mobile()==1){ $this->data['cfg']['theme'] = $website_group_content['theme_mobile']; $this->data['cfg']['mobile_view'] = $website_group_content['theme_mobile']; //不加这个,多次调用后移动端模版会复原20241118 $this->data['cfg']['tpl'] = $this->data['cfg']['webdir'].'view/'.$this->data['cfg']['theme'].'/'; } //域名 , 完整域名 $this->data['cfg']['webdomain'] = $www.$website_group['webdomain']; $this->data['cfg']['webroot'] = http().$this->data['cfg']['webdomain']; //完整域名,不带安装目录 $this->data['cfg']['weburl'] = http().$this->data['cfg']['webdomain'].$this->data['cfg']['webdir']; //完整域名,带安装目录 //站点SEO信息 if(isset($website_group_content['webname']) && !empty($website_group_content['webname'])){ $this->data['cfg']['webname'] = $website_group_content['webname']; } if(isset($website_group_content['seo_title']) && !empty($website_group_content['seo_title'])){ $this->data['cfg']['seo_title'] = $website_group_content['seo_title']; } if(isset($website_group_content['seo_keywords']) && !empty($website_group_content['seo_keywords'])){ $this->data['cfg']['seo_keywords'] = $website_group_content['seo_keywords']; } if(isset($website_group_content['seo_description']) && !empty($website_group_content['seo_description'])){ $this->data['cfg']['seo_description'] = $website_group_content['seo_description']; } //内容URL格式 if(isset($website_group_content['link_show_type']) && !empty($website_group_content['link_show_type'])){ //主站是灵活型(link_show_end = ''),分站不是灵活型 if($this->data['cfg']['link_show_type'] == 7 && $website_group_content['link_show_type'] != 7){ $this->data['cfg']['link_show_end'] = $_ENV['_config']['url_suffix']; } $this->data['cfg']['link_show_type'] = (int)$website_group_content['link_show_type']; } //模板伪静态标识 if(isset($website_group_content['theme_bj']) && !empty($website_group_content['theme_bj'])){ $this->data['cfg']['theme_bj'] = $website_group_content['theme_bj']; } //备案信息 if(isset($website_group_content['beian']) && !empty($website_group_content['beian'])){ $this->data['cfg']['beian'] = $website_group_content['beian']; } //统计代码 if(isset($website_group_content['tongji'])){ $this->data['cfg']['tongji'] = $website_group_content['tongji']; } //模板logo名,需要模板支持 if(isset($website_group_content['logoname']) && !empty($website_group_content['logoname'])){ $this->data['cfg']['logoname'] = $website_group_content['logoname']; } if(isset($website_group_content['copyright']) && !empty($website_group_content['copyright'])){ $this->data['cfg']['copyright'] = $website_group_content['copyright']; } //关闭网站 if(isset($website_group_content['close_website'])){ $this->data['cfg']['close_website'] = (int)$website_group_content['close_website']; } } unset($website_group); unset($www); unset($cache_key); } return $this->data[$key]; } // 修改 public function xset($k, $v, $key = 'cfg') { if(!isset($this->data[$key])) { $this->data[$key] = $this->get($key); } if($v && is_string($v) && ($v[0] == '+' || $v[0] == '-')) { $v = intval($v); $this->data[$key][$k] += $v; }else{ $this->data[$key][$k] = $v; } $this->changed[$key] = 1; } // 保存 public function xsave($key = 'cfg') { $this->set($key, $this->data[$key]); $this->changed[$key] = 0; } // 保存所有修改过的key public function save_changed() { foreach($this->changed as $key=>$v) { $v && $this->xsave($key); } } //删除 public function xdelete($k = ''){ strlen($k) > 32 AND $k = md5($k); $r = $this->delete($k); if($r){ return $r; }else{ return false; } } //block设置数据表缓存 public function set_block_data_cache($k, $v, $life = 60){ $r = $this->set($k, $v, $life); if($r){ 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

包含文件

其他信息