Skip to content

Commit ecb8c5a

Browse files
committed
docs: add note that dose not recommend to use $_SESSION
1 parent b9f503b commit ecb8c5a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

user_guide_src/source/libraries/sessions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ uses the session handlers' mechanism provided by PHP. Using session data is
106106
as simple as manipulating (read, set and unset values) the ``$_SESSION``
107107
array.
108108

109+
.. note:: In general, it is bad practice to use global variables.
110+
So using the superglobal ``$_SESSION`` directly is not recommended.
111+
109112
In addition, CodeIgniter also provides 2 special types of session data
110113
that are further explained below: flashdata and tempdata.
111114

0 commit comments

Comments
 (0)