Browse Source

fix

tags/6.2.0
llgoer 1 year ago
parent
commit
3d15db962b
2 changed files with 14 additions and 6 deletions
  1. +2
    -1
      src/install/index.php
  2. +12
    -5
      src/install/install.html

+ 2
- 1
src/install/index.php View File

@@ -93,8 +93,9 @@ else if ($step==2)
$dbtype = empty($dbtype)? "mysql" : $dbtype; $dbtype = empty($dbtype)? "mysql" : $dbtype;
$dblang = "utf8"; $dblang = "utf8";
if (!in_array($dbtype,array("mysql", "sqlite"))) { if (!in_array($dbtype,array("mysql", "sqlite"))) {
die("当前数据库类型不支持");
die(DedeAlert("当前数据库类型不支持", ALERT_DANGER));
} }
if (!empty($_SERVER['HTTP_HOST'])) if (!empty($_SERVER['HTTP_HOST']))
$dfbaseurl = $proto.$_SERVER['HTTP_HOST']; $dfbaseurl = $proto.$_SERVER['HTTP_HOST'];
else else


+ 12
- 5
src/install/install.html View File

@@ -39,7 +39,7 @@
<h4 class="text-center my-0">欢迎使用DedeV<?php echo $cfg_version_detail;?></h4> <h4 class="text-center my-0">欢迎使用DedeV<?php echo $cfg_version_detail;?></h4>
</div> </div>
<div class="card-body"> <div class="card-body">
<form action="index.php" method="post" name="form1">
<form action="../install/index.php" method="post" name="form1">
<input type="hidden" name="step" value="2" /> <input type="hidden" name="step" value="2" />
<input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode; ?>"> <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode; ?>">
<input type="hidden" name="adminmail" value="admin@dedebiz.com"> <input type="hidden" name="adminmail" value="admin@dedebiz.com">
@@ -49,19 +49,19 @@
<label for="dbtype" class="form-label">数据库类型</label> <label for="dbtype" class="form-label">数据库类型</label>
<select id="dbtype" name="dbtype" class="form-control form-select"> <select id="dbtype" name="dbtype" class="form-control form-select">
<option value="mysql" selected>MySQL</option> <option value="mysql" selected>MySQL</option>
<option value="sqlite">SQLite</option>
<?php if(extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php } ?>
</select> </select>
<div class="form-text text-danger">数据库类型一般为MySQL,SQLite仅用于开发调试,不建议生产中使用。</div> <div class="form-text text-danger">数据库类型一般为MySQL,SQLite仅用于开发调试,不建议生产中使用。</div>
</div> </div>
<div class="form-group">
<div class="form-group server">
<label for="dbhost" class="form-label">数据库主机</label> <label for="dbhost" class="form-label">数据库主机</label>
<input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost"> <input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
</div> </div>
<div class="form-group">
<div class="form-group server">
<label for="dbuser" class="form-label">数据库用户</label> <label for="dbuser" class="form-label">数据库用户</label>
<input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root"> <input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
</div> </div>
<div class="form-group">
<div class="form-group server">
<label for="exampleInputPassword1" class="form-label">数据库密码</label> <label for="exampleInputPassword1" class="form-label">数据库密码</label>
<input type="text" name="dbpwd" id="dbpwd" class="form-control"> <input type="text" name="dbpwd" id="dbpwd" class="form-control">
</div> </div>
@@ -128,6 +128,13 @@
} }
}) })
}) })
$("#dbtype").change(function () {
if ($(this).val() === 'sqlite') {
$(".form-group.server").hide();
} else {
$(".form-group.server").show();
}
})
</script> </script>
</body> </body>
</html> </html>

Loading…
Cancel
Save