zl程序教程

您现在的位置是:首页 >  其他

当前栏目

CodeIgniter 错误: In order to use the Session class you are required to set an encryption key

错误set to in The Key session Class
2023-09-27 14:24:03 时间

CodeIgniter SESSION  第一次用 session 遇到这个错误 ,


说是要加一个密钥才可以使用,加就加吧,


打开 config.php 找到以下代码


 


/*
|--------------------------------------------------------------------------
| 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'] = 'afafasfwertwerwer';


$config['encryption_key']    后面的密钥你随便加了。加完就可以使用了。