导入sql时连接数据库设置utf8编码

This commit is contained in:
Wisp X
2018-11-23 09:48:00 +08:00
parent b05d7445cf
commit 0ef14f3df0
+1
View File
@@ -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('数据写入失败');
}