You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/general/configuration.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ One of today's best practices for application setup is to use Environment Variab
64
64
Environment Variables should also be used for anything private such as passwords, API keys, or other sensitive data.
65
65
66
66
Environment Variables and CodeIgniter
67
-
*************************************
67
+
=====================================
68
68
69
69
CodeIgniter makes it simple and painless to set Environment Variables by using a "dotenv" file. The term comes from the file name, which starts with a dot before the text "env".
70
70
@@ -94,7 +94,7 @@ overwritten. The loaded Environment variables are accessed using any of the foll
94
94
.. warning:: Note that your settings from the **.env** file are added to Environment Variables. As a side effect, this means that if your CodeIgniter application is (for example) generating a ``var_dump($_ENV)`` or ``phpinfo()`` (for debugging or other valid reasons) **your secure credentials are publicly exposed**.
95
95
96
96
Nesting Variables
97
-
*****************
97
+
=================
98
98
99
99
To save on typing, you can reuse variables that you've already specified in the file by wrapping the
100
100
variable name within ``${...}``:
@@ -106,7 +106,7 @@ variable name within ``${...}``:
106
106
TMP_DIR="${BASE_DIR}/tmp"
107
107
108
108
Namespaced Variables
109
-
********************
109
+
====================
110
110
111
111
There will be times when you will have several variables with the same name.
112
112
The system needs a way of knowing what the correct setting should be.
@@ -168,7 +168,7 @@ Some environments do not permit variable name with dots. In such case, you could
168
168
app_CSPEnabled = true
169
169
170
170
Environment Variables as Replacements for Data
171
-
**********************************************
171
+
==============================================
172
172
173
173
It is very important to always remember that environment variables contained in your **.env** are
174
174
**only replacements for existing data**. This means that you cannot expect to fill your **.env** with all
@@ -183,7 +183,7 @@ Simply put, you cannot just put ``app.myNewConfig = foo`` in your **.env** and e
183
183
to magically have that property and value at run time.
184
184
185
185
Treating Environment Variables as Arrays
186
-
****************************************
186
+
========================================
187
187
188
188
A namespaced environment variable can be further treated as an array.
189
189
If the prefix matches the configuration class, then the remainder of the
0 commit comments