Thinkphp5.0读取自定义配置文件


//新建配置文件,位置application/extra/user.php
 
//文件内容格式
return [
    "name"=>"xiaoli",
    "age"=>15
];
 
//先引用
use think\Config;
 
//读取自定义拓展配置
dump(config('user'));
dump(config('user.name'));
————————————————

你可能感兴趣的:(tp5)