mirror of
https://github.com/ZeroDream-CN/PHPMC7
synced 2024-11-27 23:02:52 +08:00
修复安装程序 utf8mb4 乱码问题
This commit is contained in:
parent
d67748e2a1
commit
35ff2e0469
@ -63,6 +63,7 @@ function install() {
|
|||||||
$password = password_hash(md5($password), PASSWORD_BCRYPT);
|
$password = password_hash(md5($password), PASSWORD_BCRYPT);
|
||||||
$conn = mysqli_connect($db_host, $db_user, $db_pass, "", $db_port) or die("<script>alert('无法连接到 MySQL 数据库,请检查。错误:" . mysqli_error($conn) . "');location='?step=2';</script>");
|
$conn = mysqli_connect($db_host, $db_user, $db_pass, "", $db_port) or die("<script>alert('无法连接到 MySQL 数据库,请检查。错误:" . mysqli_error($conn) . "');location='?step=2';</script>");
|
||||||
mysqli_select_db($conn, $db_name) or die("<script>alert('数据库 {$db_name} 不存在!');location='?step=2';</script>");
|
mysqli_select_db($conn, $db_name) or die("<script>alert('数据库 {$db_name} 不存在!');location='?step=2';</script>");
|
||||||
|
mysqli_query($conn, "set names 'utf8mb4'");
|
||||||
mysqli_query($conn, "SET FOREIGN_KEY_CHECKS=0;") or die("<script>alert('错误:" . mysqli_error($conn) . "');location='?step=2';</script>");
|
mysqli_query($conn, "SET FOREIGN_KEY_CHECKS=0;") or die("<script>alert('错误:" . mysqli_error($conn) . "');location='?step=2';</script>");
|
||||||
mysqli_query($conn, "CREATE TABLE `daemon` (
|
mysqli_query($conn, "CREATE TABLE `daemon` (
|
||||||
`id` int(8) NOT NULL AUTO_INCREMENT,
|
`id` int(8) NOT NULL AUTO_INCREMENT,
|
||||||
|
Loading…
Reference in New Issue
Block a user