Home > Backend Development > PHP Tutorial > Solution to error when CI framework automatically loads session_PHP tutorial

Solution to error when CI framework automatically loads session_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:24:39
Original
1051 people have browsed it

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!

www.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...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template