Skip to content

Commit

Permalink
修复安装后端口没有写入配置文件的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx0814 committed Apr 3, 2018
1 parent 57442ab commit b34ed32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@
$errno = $link->connect_errno;
$error = $link->connect_error;
}else{
list($dbhost1,$port)=explode(':',$dbhost);
if(empty($port)) $port='3306';
$link = @mysql_connect($dbhost, $dbuser, $dbpw);
$errno = mysql_errno();
$error = mysql_error();
Expand Down Expand Up @@ -218,6 +220,7 @@
$_config['db'][1]['dbname'] = $dbname;
$_config['db'][1]['dbpw'] = $dbpw;
$_config['db'][1]['dbuser'] = $dbuser;
$_config['db'][1]['port'] = $port?$port:'3306';
$_config['db'][1]['tablepre'] = $tablepre;
$_config['admincp']['founder'] = (string)$uid;
$_config['security']['authkey'] = $authkey;
Expand Down

0 comments on commit b34ed32

Please sign in to comment.