When many programmers use sessions in CI, the website will report an error after turning on automatic loading of sessions. The specific 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 to the problem.
Prompt information: If you want to use the session class, you must set an encryption key ! Then set one up, after all, it is for safety reasons.
Open application/config/config.php and find the Encryption Key
Copy code 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';//Add the key here and it will work!
http://www.bkjia.com/PHPjc/825348.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/825348.htmlTechArticleWhen many programmers use sessions in CI, the website will report an error after turning on automatic loading of sessions. The specific error information As follows: In order to use the Session class you are required to...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn