Solutions to Errors in CI Framework Autoloading session
- 2021-06-29 10:34:25
- OfStack
When many programmers use session in CI, they start loading session automatically and then the website errors as follows: In order to use the Session class you are required set an encryption key
Below is a look at problem solving.
Tip note: If you want to use the session class, you must set an encrypted key!Let's set one up, after all, for security reasons.
Open application/config/config.php to find Encryption Key
/*
|--------------------------------------------------------------------------
| 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';// Add a key here and it will work!