<?php private function _init_setting() { //是否初始化设置,默认情况下为true if ($this->init_setting) { //注意:var就是G变量 //检查$_G['setting']是否具有空值 if (empty($this->var['setting'])) { //缓存设置文件 $this->cachelist[] = 'setting'; } //检查$_G['style']是否具有空值 if (empty($this->var['style'])) { //默认风格缓存设置 $this->cachelist[] = 'style_default'; } //检查$_G['cache']['cronnextrun']是否具有值 if (!isset($this->var['cache']['cronnextrun'])) { //缓存计划任务 $this->cachelist[] = 'cronnextrun'; } } //打印当前$this->cachelist的值 //echo "<pre>".var_export($this->cachelist,1)."</pre>";exit; //$this->cachelist = array(0=>'announcements', 1=>'onlinelist', 2=>'forumlinks', 3=>'heats', 4=>'historyposts', 5=>'onlinerecord', 6=>'userstats', 7=>'diytemplatenameforum', 8=>'plugin', 9=>'pluginlanguage_system', 10=>'setting', 11=>'style_default', 12=>'cronnextrun',); //加载缓存列表中存在的缓存数据,loadcache():读取缓存 !empty($this->cachelist) && loadcache($this->cachelist); if (!is_array($this->var['setting'])) { $this->var['setting'] = array(); } } ?>