1
0
mirror of https://github.com/ZeroDream-CN/PHPMC7 synced 2026-05-19 04:09:54 +08:00

增加多语言支持,修复 utf8mb4 乱码问题

更新版本到 7.3.3325
This commit is contained in:
2018-10-19 18:39:25 +08:00
Unverified
parent 0794b18efc
commit d5d5962746
21 changed files with 392 additions and 171 deletions
+1
View File
@@ -10,6 +10,7 @@ class Profile {
if(!empty($username) && preg_match("/^[A-Za-z0-9\-\_]+$/", $username)) {
$db = Config::MySQL();
$conn = mysqli_connect($db['host'], $db['user'], $db['pass'], $db['name'], $db['port']);
mysqli_query($conn, "set names 'utf8mb4'");
// Method 1 通过用户名查找用户
$rs = mysqli_fetch_array(mysqli_query($conn, "SELECT * FROM `{$db['name']}`.`users` WHERE `username`='{$username}'"));
if($rs) {