Home > Backend Development > PHP Tutorial > PHP框架Yii2通过内置的方法怎么把配置信息写入到配置文件

PHP框架Yii2通过内置的方法怎么把配置信息写入到配置文件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:36:19
Original
1119 people have browsed it

​比如我再后台配置了邮件信息,我想法邮件信息更新到common\main-local.php里面 代码应该怎么写?

回复内容:

​比如我再后台配置了邮件信息,我想法邮件信息更新到common\main-local.php里面 代码应该怎么写?

common\main-local.php中的邮件配置从另一个文件中引入,后台控制器先将数据保存到数据库中,然后再生成引入的这个文件。后台控制器中生成文件的方法可以直接用原生方法。

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template