thinkphp5生成和修改配置文件
例如:
$filename = APP_PATH . "extra" . DS . "webconfig.php";
$data = ['web_title'=>"csdn"];
put_array($data, $filename);
thinkphp5获取配置文件中的内容
例如:
$web_title = \
think\Config::get('webconfig.web_title');
$webconfig = \
think\Config::get('webconfig');
转载请注明原文地址:https://tech.qufami.com/read-4946.html