改进安装方法

This commit is contained in:
Wisp X
2018-11-20 18:14:50 +08:00
parent fe11dc4e26
commit 00e784ba98
3 changed files with 52 additions and 25 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ use think\Controller;
use think\Exception;
use think\facade\Config;
use think\facade\Session;
use think\facade\Env;
class Base extends Controller
{
@@ -37,7 +38,7 @@ class Base extends Controller
parent::initialize();
// 检测程序是否已安装
if (!file_exists(\think\facade\Env::get('root_path') . 'install.lock')) {
if (!file_exists(Env::get('config_path') . 'db.php')) {
return $this->redirect(url('/install'));
}
@@ -126,4 +127,4 @@ class Base extends Controller
return true;
}
}
}