导入sql时连接数据库设置utf8编码
This commit is contained in:
@@ -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('数据写入失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user