正在显示
1 个修改的文件
包含
73 行增加
和
63 行删除
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -// +---------------------------------------------------------------------- | ||
| 4 | -// | ThinkPHP [ WE CAN DO IT JUST THINK ] | ||
| 5 | -// +---------------------------------------------------------------------- | ||
| 6 | -// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. | ||
| 7 | -// +---------------------------------------------------------------------- | ||
| 8 | -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
| 9 | -// +---------------------------------------------------------------------- | ||
| 10 | -// | Author: liu21st <liu21st@gmail.com> | ||
| 11 | -// +---------------------------------------------------------------------- | ||
| 12 | - | ||
| 13 | -use think\Env; | ||
| 14 | - | ||
| 15 | -return [ | ||
| 16 | - // 数据库类型 | ||
| 17 | - 'type' => Env::get('database.type', 'mysql'), | ||
| 18 | - // 服务器地址 | ||
| 19 | - 'hostname' => Env::get('database.hostname', 'rm-8vbba55q5iq66tm447o.mysql.zhangbei.rds.aliyuncs.com'), | ||
| 20 | - // 数据库名 | ||
| 21 | - 'database' => Env::get('database.database', 'cxcy'), | ||
| 22 | - // 用户名 | ||
| 23 | - 'username' => Env::get('database.username', 'wlzjedu'), | ||
| 24 | - // 密码 | ||
| 25 | - 'password' => Env::get('database.password', 'Password01!$'), | ||
| 26 | - // 'hostname' => Env::get('database.hostname', '39.100.143.32'), | ||
| 27 | - // // 数据库名 | ||
| 28 | - // 'database' => Env::get('database.database', 'innovation'), | ||
| 29 | - // // 用户名 | ||
| 30 | - // 'username' => Env::get('database.username', 'innovation'), | ||
| 31 | - // // 密码 | ||
| 32 | - // 'password' => Env::get('database.password', 'nYzL6AmDwhxCLX75'), | ||
| 33 | - // 端口 | ||
| 34 | - 'hostport' => Env::get('database.hostport', '3306'), | ||
| 35 | - // 连接dsn | ||
| 36 | - 'dsn' => '', | ||
| 37 | - // 数据库连接参数 | ||
| 38 | - 'params' => [], | ||
| 39 | - // 数据库编码默认采用 utf8mb4 | ||
| 40 | - 'charset' => Env::get('database.charset', 'utf8mb4'), | ||
| 41 | - // 数据库表前缀 | ||
| 42 | - 'prefix' => Env::get('database.prefix', 'fa_'), | ||
| 43 | - // 数据库调试模式 | ||
| 44 | - 'debug' => Env::get('database.debug', false), | ||
| 45 | - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) | ||
| 46 | - 'deploy' => 0, | ||
| 47 | - // 数据库读写是否分离 主从式有效 | ||
| 48 | - 'rw_separate' => false, | ||
| 49 | - // 读写分离后 主服务器数量 | ||
| 50 | - 'master_num' => 1, | ||
| 51 | - // 指定从服务器序号 | ||
| 52 | - 'slave_no' => '', | ||
| 53 | - // 是否严格检查字段是否存在 | ||
| 54 | - 'fields_strict' => true, | ||
| 55 | - // 数据集返回类型 | ||
| 56 | - 'resultset_type' => 'array', | ||
| 57 | - // 自动写入时间戳字段 | ||
| 58 | - 'auto_timestamp' => false, | ||
| 59 | - // 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s | ||
| 60 | - 'datetime_format' => false, | ||
| 61 | - // 是否需要进行SQL性能分析 | ||
| 62 | - 'sql_explain' => false, | ||
| 63 | -]; | 1 | +<?php |
| 2 | + | ||
| 3 | +// +---------------------------------------------------------------------- | ||
| 4 | +// | ThinkPHP [ WE CAN DO IT JUST THINK ] | ||
| 5 | +// +---------------------------------------------------------------------- | ||
| 6 | +// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. | ||
| 7 | +// +---------------------------------------------------------------------- | ||
| 8 | +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
| 9 | +// +---------------------------------------------------------------------- | ||
| 10 | +// | Author: liu21st <liu21st@gmail.com> | ||
| 11 | +// +---------------------------------------------------------------------- | ||
| 12 | + | ||
| 13 | +use think\Env; | ||
| 14 | + | ||
| 15 | +return [ | ||
| 16 | + // 数据库类型 | ||
| 17 | + 'type' => Env::get('database.type', 'mysql'), | ||
| 18 | + // 服务器地址 | ||
| 19 | + 'hostname' => Env::get('database.hostname', 'rm-8vbba55q5iq66tm447o.mysql.zhangbei.rds.aliyuncs.com'), | ||
| 20 | + // 数据库名 | ||
| 21 | + 'database' => Env::get('database.database', 'cxcy'), | ||
| 22 | + // 用户名 | ||
| 23 | + 'username' => Env::get('database.username', 'wlzjedu'), | ||
| 24 | + // 密码 | ||
| 25 | + 'password' => Env::get('database.password', 'Password01!$'), | ||
| 26 | + //测试库 | ||
| 27 | +// 'hostname' => Env::get('database.hostname', '39.100.143.32'), | ||
| 28 | +//// 数据库名 | ||
| 29 | +// 'database' => Env::get('database.database', 'employed_dev'), | ||
| 30 | +//// 用户名 | ||
| 31 | +// 'username' => Env::get('database.username', 'employed_dev'), | ||
| 32 | +//// 密码 | ||
| 33 | +// 'password' => Env::get('database.password', 'cDAP5mNGS7CaDK7y'), | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + // 'hostname' => Env::get('database.hostname', '39.100.143.32'), | ||
| 37 | + // // 数据库名 | ||
| 38 | + // 'database' => Env::get('database.database', 'innovation'), | ||
| 39 | + // // 用户名 | ||
| 40 | + // 'username' => Env::get('database.username', 'innovation'), | ||
| 41 | + // // 密码 | ||
| 42 | + // 'password' => Env::get('database.password', 'nYzL6AmDwhxCLX75'), | ||
| 43 | + // 端口 | ||
| 44 | + 'hostport' => Env::get('database.hostport', '3306'), | ||
| 45 | + // 连接dsn | ||
| 46 | + 'dsn' => '', | ||
| 47 | + // 数据库连接参数 | ||
| 48 | + 'params' => [], | ||
| 49 | + // 数据库编码默认采用 utf8mb4 | ||
| 50 | + 'charset' => Env::get('database.charset', 'utf8mb4'), | ||
| 51 | + // 数据库表前缀 | ||
| 52 | + 'prefix' => Env::get('database.prefix', 'fa_'), | ||
| 53 | + // 数据库调试模式 | ||
| 54 | + 'debug' => Env::get('database.debug', false), | ||
| 55 | + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) | ||
| 56 | + 'deploy' => 0, | ||
| 57 | + // 数据库读写是否分离 主从式有效 | ||
| 58 | + 'rw_separate' => false, | ||
| 59 | + // 读写分离后 主服务器数量 | ||
| 60 | + 'master_num' => 1, | ||
| 61 | + // 指定从服务器序号 | ||
| 62 | + 'slave_no' => '', | ||
| 63 | + // 是否严格检查字段是否存在 | ||
| 64 | + 'fields_strict' => true, | ||
| 65 | + // 数据集返回类型 | ||
| 66 | + 'resultset_type' => 'array', | ||
| 67 | + // 自动写入时间戳字段 | ||
| 68 | + 'auto_timestamp' => false, | ||
| 69 | + // 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s | ||
| 70 | + 'datetime_format' => false, | ||
| 71 | + // 是否需要进行SQL性能分析 | ||
| 72 | + 'sql_explain' => false, | ||
| 73 | +]; |
-
请 注册 或 登录 后发表评论