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

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']    后面的密钥你随便加了。加完就可以使用了。

你可能感兴趣的:(CodeIgniter)