From 0ef14f3df01c7d7d3e50cc5a7cd7ab51ad28a61a Mon Sep 17 00:00:00 2001 From: Wisp X <1591788658@qq.com> Date: Fri, 23 Nov 2018 09:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5sql=E6=97=B6=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=95=B0=E6=8D=AE=E5=BA=93=E8=AE=BE=E7=BD=AEutf8?= =?UTF-8?q?=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Install.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/index/controller/Install.php b/application/index/controller/Install.php index ec757f73..d9291fc8 100644 --- a/application/index/controller/Install.php +++ b/application/index/controller/Install.php @@ -64,6 +64,7 @@ class Install extends Controller $mysqli->close(); throw new Exception($mysqli->connect_error); } + $mysqli->query("SET NAMES utf8"); if (!$mysqli->multi_query($sqlFile)) { throw new Exception('数据写入失败'); }