modified 完善安装细节!

This commit is contained in:
zhaoxiang 2016-11-21 01:11:09 +08:00
parent 86ab02cac6
commit fe4e62e2b2
3 changed files with 8 additions and 21 deletions

View File

@ -77,7 +77,7 @@ class Index extends Controller {
public function step3(){
$step = session('step');
if( $step != 2){
if( $step != 2 && $step != 3 ){
$this->error("请按顺序安装", url('index'));
}else{
session('step', 3);
@ -110,6 +110,7 @@ class Index extends Controller {
if( $step != 3){
$this->error("请按顺序安装", url('index'));
}else{
session('step', 4);
session('error', false);
echo $this->fetch();
$dbConfig = session('dbConfig');
@ -154,7 +155,6 @@ class Index extends Controller {
if(session('error')){
$this->error('安装出错', url('index'));
}else{
session('step', 4);
$str = "<meta http-equiv='Refresh' content='0;URL=".url('complete')."'>";
exit($str);
}

View File

@ -9,9 +9,13 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
define('BIND_MODULE','admin');
// 定义应用目录
define('APP_PATH', __DIR__ . '/../../application/');
// [ 应用入口文件 ]
if(file_exists(APP_PATH .'extra' . DIRECTORY_SEPARATOR . 'install.lock') === false){
define('BIND_MODULE','install');
}else{
define('BIND_MODULE','admin');
}
// 加载框架引导文件
require __DIR__ . '/../../thinkphp/start.php';

View File

@ -1,17 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// [ 应用入口文件 ]
define('BIND_MODULE','install');
// 定义应用目录
define('APP_PATH', __DIR__ . '/../../application/');
// 加载框架引导文件
require __DIR__ . '/../../thinkphp/start.php';