Skip to content

Commit 2d574c3

Browse files
committed
docs: add section titles
1 parent 42b174f commit 2d574c3

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

user_guide_src/source/general/configuration.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,26 @@ Environment Variables should also be used for anything private such as passwords
6565

6666
.. _dotenv-file:
6767

68-
Environment Variables and CodeIgniter
69-
=====================================
68+
Dotenv File
69+
===========
7070

7171
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".
7272

73-
CodeIgniter expects **.env** to be at the root of your project alongside the
74-
``app`` directories. There is a template file distributed with CodeIgniter that's
75-
located at the project root named **env** (Notice there's no dot (**.**) at the start?).
73+
Creating Dotenv File
74+
--------------------
75+
76+
CodeIgniter expects the **.env** file to be at the root of your project alongside the
77+
**app** directories. There is a template file distributed with CodeIgniter that's
78+
located at the project root named **env** (Notice there's no dot (``.``) at the start?).
7679
It has a large collection of variables your project might use that have been assigned
7780
empty, dummy, or default values. You can use this file as a starting place for your
7881
application by either renaming the template to **.env**, or by making a copy of it named **.env**.
7982

8083
.. important:: Make sure the **.env** file is NOT tracked by your version control system. For *git* that means adding it to **.gitignore**. Failure to do so could result in sensitive credentials being exposed to the public.
8184

85+
Setting Variables
86+
-----------------
87+
8288
Settings are stored in **.env** files as a simple a collection of name/value pairs separated by an equal sign.
8389
::
8490

@@ -88,7 +94,12 @@ Settings are stored in **.env** files as a simple a collection of name/value pai
8894

8995
When your application runs, **.env** will be loaded automatically, and the variables put
9096
into the environment. If a variable already exists in the environment, it will NOT be
91-
overwritten. The loaded Environment variables are accessed using any of the following:
97+
overwritten.
98+
99+
Getting Variables
100+
-----------------
101+
102+
The loaded environment variables are accessed using any of the following:
92103
``getenv()``, ``$_SERVER``, or ``$_ENV``.
93104

94105
.. literalinclude:: configuration/005.php

0 commit comments

Comments
 (0)