Welcome Guest, Not a member yet? Register   Sign In
Load database config from external file.
#1

(This post was last modified: 08-18-2022, 06:23 AM by php_rocs.)

Hello,

In the company I work, we developed a webapp based on CI, and my boss wants to "skip" the part when he needs to set the database parameters in CI, because we have already another file in another directory (/etc) where all that information is. So my question is: Is there a way to load that file externally instead of setting the database info in every new install?

Thanks in advance.

Betflik
Reply
#2

Read the file and set the config to environment variables.

> When you instantiate a configuration class, any namespaced environment variables are considered for merging into the configuration object’s properties.
See https://codeigniter4.github.io/CodeIgnit...-variables
Reply




Theme © iAndrew 2016 - Forum software by © MyBB