安装的

This commit is contained in:
雨中磐石
2023-01-10 16:11:19 +08:00
parent f4d68700c7
commit db405df1ed
2 changed files with 10 additions and 5 deletions

View File

@@ -11,11 +11,11 @@ class installClassAction extends ActionNot{
{ {
$this->tpltype = 'html'; $this->tpltype = 'html';
$this->title = TITLE.'_安装'; $this->title = TITLE.'_安装';
$dbdiz = '127.0.0.1'; $dbdiz = '';
$paths = '../../mysql5.6.10/my.ini'; $paths = '../../mysql5.6.10/my.ini';
if(@file_exists($paths)){ if(@file_exists($paths)){
$_conts = @file_get_contents($paths); $_conts = @file_get_contents($paths);
if($_conts && contain($_conts,'3307'))$dbdiz.=':3307'; if($_conts && contain($_conts,'3307'))$dbdiz='3307';
} }
$this->assign('dbdiz', $dbdiz); $this->assign('dbdiz', $dbdiz);
} }
@@ -48,6 +48,7 @@ class installClassAction extends ActionNot{
$dbtype = $this->post('dbtype'); $dbtype = $this->post('dbtype');
$host = $this->post('host'); $host = $this->post('host');
$user = $this->post('user'); $user = $this->post('user');
$duankou = $this->post('duankou');
$pass = $this->post('pass'); $pass = $this->post('pass');
$base = $this->post('base'); $base = $this->post('base');
$xinhukey = $this->post('xinhukey'); $xinhukey = $this->post('xinhukey');
@@ -59,7 +60,7 @@ class installClassAction extends ActionNot{
$paths = ''.P.'/'.P.'Config.php'; $paths = ''.P.'/'.P.'Config.php';
$paths1 = ''.P.'/'.P.'Config.php1'; $paths1 = ''.P.'/'.P.'Config.php1';
$inpaths = ROOT_PATH.'/'.$paths.''; $inpaths = ROOT_PATH.'/'.$paths.'';
if($duankou)$user.=':'.$duankou.'';
$msg = ''; $msg = '';

View File

@@ -60,14 +60,18 @@
<tr> <tr>
<td align="right" width="150px"><font color=red>*</font>数据库地址:</td> <td align="right" width="150px"><font color=red>*</font>数据库地址:</td>
<td><input class="input" name="host" value="<?=$dbdiz?>"></td> <td><input class="input" name="host" value="127.0.0.1"></td>
</tr>
<tr>
<td align="right">数据库端口:</td>
<td><input class="input" name="duankou" placeholder="默认3306不用写其他就要写" value="<?=$dbdiz?>"></td>
</tr> </tr>
<tr><td height="8"></td></tr> <tr><td height="8"></td></tr>
<tr> <tr>
<td align="right"><font color=red>*</font>用户名</td> <td align="right"><font color=red>*</font>数据库帐号</td>
<td><input class="input" name="user" value="root"></td> <td><input class="input" name="user" value="root"></td>
</tr> </tr>