mirror of
https://github.com/ZeroDream-CN/PHPMC7
synced 2024-11-27 23:02:52 +08:00
修复一些小问题
This commit is contained in:
parent
35ff2e0469
commit
3a9dd717e2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user