如果想用session类的话就必须要设置一个加密的密钥。
打开application/config/config.php找到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’;//在这里加上密钥即可正常!