Пример #1
0
 public function rebuildAccess()
 {
     D('Node')->where('1')->delete();
     //清空
     D('Access')->where('1')->delete();
     //清空
     $Access = new AccessEvent();
     $Access->initAdmin();
     $Access->initWeixin();
     $this->success("重建完成,请重新分配权限");
 }
Пример #2
0
 /**
  *
  */
 public function step5()
 {
     File::delAll(RUNTIME_PATH);
     File::delAll(LOG_PATH);
     File::delAll(WEB_CACHE_PATH);
     File::delAll(WEB_ROOT . 'Data/Cache');
     File::delAll(WEB_ROOT . 'Data/Temp');
     //A('Install/Test')->init($key = 'zts');
     $Access = new AccessEvent();
     $Access->initAdmin();
     $Access->initWeixin();
     // File::delAll(WEB_ROOT . 'Data/Install');
     if (File::writeFile(WEB_ROOT . 'Data/Install/install.lock', 'installed', 'w+')) {
         C('URL_MODEL', 3);
         $this->success('GreenCMS安装成功,5秒钟返回首页', U('Home/Index/index'), 5);
     }
 }