Przeglądaj źródła

修复:install脚本数据库端口号问题

萤火科技 4 lat temu
rodzic
commit
0829cec2d4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      public/install/index.php

+ 1 - 1
public/install/index.php

@@ -188,7 +188,7 @@ if ($s == 63832) {
     $dbpwd = $_GET['dbpwd'] ?? '';
     $dbpwd = $_GET['dbpwd'] ?? '';
     $dbport = $_GET['dbport'] ?? '';
     $dbport = $_GET['dbport'] ?? '';
     try {
     try {
-        $dsn = "mysql:host=$dbhost;charset=utf8";
+        $dsn = "mysql:host=$dbhost;port={$dbport};charset=utf8";
         $pdo = new PDO($dsn, $dbuser, $dbpwd);
         $pdo = new PDO($dsn, $dbuser, $dbpwd);
         echo 'true';
         echo 'true';
     } catch (Exception $e) {
     } catch (Exception $e) {