我尝试使用后端和前端创建应用程序。文件夹结构如下(仅显示配置文件位置以解释问题)
+root
|-admin
|-application
|—backend
|—config
|—config.php
|—frontend
|—config
|—config.php
|-system
使用后端管理面板我尝试在后端和前端config.php值中更改配置值。但我无法在前端config.php文件中更改它。我不需要基于数据库的解决方案。
答案 0 :(得分:1)
阅读documentation我得到了这个:
Note: CodeIgniter always tries to load the configuration files for the current environment first. If the file does not exist, the global config file (i.e., the one in application/config/) is loaded. This means you are not obligated to place all of your configuration files in an environment folder − only the files that change per environment.
所以基于这些信息,我认为问题出在你打电话的时候,可能是你的路径问题。