123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace Install\Controller;
- use Think\Controller;
- use Think\Storage;
- class IndexController extends Controller{
-
- public function index(){
-
- if(is_file( '/Modules/Common/Conf/db.php')){
-
-
- $msg = '请删除install.lock文件后再运行安装程序!';
- }else{
- $msg = '已经成功安装,请不要重复安装!';
- }
- if(Storage::has('Modules/Common/Conf/install.lock')){
- $this->error($msg);
- }
- $this->display();
- }
-
- public function complete(){
- $step = session('step');
- if(!$step){
- $this->redirect('index');
- } elseif($step != 3) {
- $this->redirect("Install/step{$step}");
- }
-
- Storage::put('./Modules/Common/Conf/install.lock', 'lock');
-
- clear_cache();
-
- session('step', null);
- session('error', null);
- session('update',null);
- $this->display();
- }
- }
|