1
0
mirror of https://github.com/ZeroDream-CN/PHPMC7 synced 2024-11-27 23:02:52 +08:00

修复一些小问题

This commit is contained in:
Akkariin Meiko 2018-10-19 21:41:43 +08:00
parent 35ff2e0469
commit 3a9dd717e2

View File

@ -6,7 +6,14 @@ include(ROOT . "/include/data/config.php");
$Lang = new Lang();
$Option = new Option();
$result = $Option->getOption("Lang");
$result = $result == "" ? "zh-CN" : $result;
if($result == "") {
$db = Config::MySQL();
$conn = mysqli_connect($db['host'], $db['user'], $db['pass'], $db['name'], $db['port']);
mysqli_query($conn, "set names 'utf8mb4'");
mysqli_query($conn, "INSERT INTO `option` VALUES ('4', 'Lang', 'zh_CN')");
$result = "zh_CN";
mysqli_close($conn);
}
$Lang->setLang($result);
class Loader {