public function __construct($para = array()) { if(!empty($para)) { $this->_table = $para['table']; $this->_pk = $para['pk']; } if(isset($this->_pre_cache_key) && (($ttl = getglobal('setting/memory/'.$this->_table)) !== null || ($ttl = $this->_cache_ttl) !== null) && memory('check')) { $this->_cache_ttl = $ttl; $this->_allowmem = true; } $this->repair();//解决表是否崩溃,新加进去的代码 $this->_init_extend(); parent::__construct(); } //解决表是否崩溃,新加进去的一个自己检查是否需要修复的代码 public function repair() { $query1=DB::query('CHECK TABLE '.DB::table($this->_table)); $checkresult =mysql_fetch_array($query1, MYSQL_ASSOC); //echo(DB::table($this->_table)); //exit; if($checkresult['Msg_text'] != 'OK') { DB::query('REPAIR TABLE '.DB::table($this->_table)); } } |


常见问题
相关文章
猜你喜欢
- Discuz-内容页-发帖按钮 2021-08-20
- DiscuzX3.2开发手机登录流程 禁止转载 2021-08-20
- 详细分析 Discuz 中的showmessage()函数 及 用法 2021-08-20
- $article[‘related’]Discuz 门户文章内容页的相关文章 2021-08-20
- discuz getuserprofile($field) 获取当前用户扩展字段 2021-08-20
- discuz实现手机版播放优酷.swf视频教程 2021-08-20
- 阿里云提示 Didcuz memcache+ssrf GETSHELL漏洞 修复方法 2021-08-20
- discuz帖子内容页 上一篇 下一篇 代码 2021-08-20
- discuz模板开发无缓存开启方法 2021-08-20
- discuz帖子截取简介str_replace函数和messagecutstr函数组合使用 2021-08-20