Skip to content

Commit

Permalink
修复安装时数据库连接问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx0814 committed Apr 8, 2018
1 parent b34ed32 commit c53b8dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@
}elseif(strpos($dbhost,'.sock')!==false){//地址直接是socket地址
$unix_socket=$dbhost1;
$dbhost1='localhost';
}else{
$dbhost1=$dbhost;
}
if(empty($port)) $port='3306';
$link = new mysqli($dbhos1, $dbuser, $dbpw, $dbname, $port, $unix_socket);
$link = new mysqli($dbhost1, $dbuser, $dbpw, $dbname, $port, $unix_socket);
$errno = $link->connect_errno;
$error = $link->connect_error;
}else{
Expand Down

0 comments on commit c53b8dd

Please sign in to comment.