diff --git a/application/install/controller/Index.php b/application/install/controller/Index.php
index 4adc7dc..1da3d54 100644
--- a/application/install/controller/Index.php
+++ b/application/install/controller/Index.php
@@ -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 = "";
exit($str);
}
diff --git a/public/admin/index.php b/public/admin/index.php
index cafa48a..be2ab65 100644
--- a/public/admin/index.php
+++ b/public/admin/index.php
@@ -9,9 +9,13 @@
// | Author: liu21st
// +----------------------------------------------------------------------
-// [ 应用入口文件 ]
-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';
diff --git a/public/admin/install.php b/public/admin/install.php
deleted file mode 100644
index be11443..0000000
--- a/public/admin/install.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-// +----------------------------------------------------------------------
-
-// [ 应用入口文件 ]
-define('BIND_MODULE','install');
-// 定义应用目录
-define('APP_PATH', __DIR__ . '/../../application/');
-// 加载框架引导文件
-require __DIR__ . '/../../thinkphp/start.php';