代码提交

This commit is contained in:
Ghost
2025-03-17 10:09:27 +08:00
parent f4e36f1921
commit 3ed4bd7eca
15 changed files with 1224 additions and 85 deletions

View File

@@ -9,19 +9,20 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Env;
return [
// 数据库类型
'type' => 'mysql',
'type' => Env::get('database.type', 'mysql'),
// 服务器地址
'hostname' => '127.0.0.1',
'hostname' => Env::get('database.hostname', '127.0.0.1'),
// 数据库名
'database' => 'yishi',
'database' => Env::get('database.database', 'database'),
// 用户名
'username' => 'yishi',
'username' => Env::get('database.username', 'root'),
// 密码
'password' => 'KcankSjjdZ5CsTC7',
'password' => Env::get('database.password', 'root'),
// 端口
'hostport' => '',
'hostport' => Env::get('database.hostport', '3306'),
// 连接dsn
'dsn' => '',
// 数据库连接参数
@@ -29,7 +30,7 @@ return [
// 数据库编码默认采用utf8
'charset' => 'utf8mb4',
// 数据库表前缀
'prefix' => 'tk_',
'prefix' => Env::get('database.prefix', 'tk_'),
// 数据库调试模式
'debug' => true,
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)