优化安装程序

This commit is contained in:
2020-04-14 15:03:10 +08:00
parent 30cb23b68b
commit 6f9b4db367
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -55,6 +55,9 @@ if ($action == 'index') {
if (!$dbc) {
echo json_encode(['code'=>0,'msg'=>'请填写完系统配置信息!']);exit();
}
if ($data['admin']['password'] !== $data['admin']['repassword']) {
echo json_encode(['code'=>0,'msg'=>'管理员密码错误']);exit();
}
$info = str_replace("{secret}", \xin\helper\Str::random(32), $info);
file_put_contents(ROOT_PATH . '.env', $info);
session('database_info', $data['database']);