Thinkphp5.0.1 助手函数Config

浏览:5488 发布日期:2017/03/15 分类:求助交流
我想用config函数获取database这个参数的值就可以
代码:config("database")但是却输出了所有数据库配置信息

Array
(
[type] => mysql
[dsn] =>
[hostname] => localhost
[database] => test
[username] => root
[password] => root
[hostport] => 3306
[params] => Array
(
)

[charset] => utf8
[prefix] =>
[debug] => 1
[deploy] => 0
[rw_separate] =>
[master_num] => 1
[slave_no] =>
[fields_strict] => 1
[auto_timestamp] =>
[resultset_type] => array
[sql_explain] =>
)
请问是该怎么解决?
最佳答案
评论( 相关
后面还有条评论,点击查看>>