The CI framework automatically loads the session and reports an error. When many programmers use session in CI, the website reports an error after the session is automatically loaded. the error message is as follows: InordertousetheSessionclassyouarerequiredto when many programmers use session in CI, after the session is automatically loaded, the website reports an error. the error message is as follows: In order to use the Session class you are required to set an encryption key
Let's take a look at the solution.
Note:To use the session class, you must set an encryption key.! Let's set one. after all, it is also out of security considerations.
Open application/config. php and find the Encryption Key.
The code is as follows:
/*
| --------------------------------------------------------------------------
| Encryption Key
| --------------------------------------------------------------------------
| If you use the Encryption class or the Session class you
| MUST set an encryption key. See the user guide for info.
*/
$ Config ['encryption _ key'] = 'xxxxx'; // you can add a key here!
Please order to use the Session class you are required...