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

简介: CodeIgniter SESSION  第一次用 session 遇到这个错误 ,说是要加一个密钥才可以使用,加就加吧,打开 config.php 找到以下代码 /*|-----------------------------------------------------------------...

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

如何联系我:【万里虎】www.bravetiger.cn 【QQ】3396726884 (咨询问题100元起,帮助解决问题500元起) 【博客】http://www.cnblogs.com/kenshinobiy/
目录
相关文章
eggjs 项目报错 Cookie need secret key to sign and encrypt. Please set config.keys first
eggjs 项目报错 Cookie need secret key to sign and encrypt. Please set config.keys first
287 0
eggjs 项目报错 Cookie need secret key to sign and encrypt. Please set config.keys first
|
23天前
|
API
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
|
24天前
|
Java 应用服务中间件 nginx
【Azure 环境】Azure应用程序网关设置set_Cookie=key=value; SameSite=Strict; HTTPOnly,AzureAD登录使用cookie时使用不了的案例记录
【Azure 环境】Azure应用程序网关设置set_Cookie=key=value; SameSite=Strict; HTTPOnly,AzureAD登录使用cookie时使用不了的案例记录
|
24天前
|
缓存 NoSQL Redis
【Azure Redis 缓存】Azure Cache for Redis 是否记录具体读/写(Get/Set)或删除(Del)了哪些key呢?
【Azure Redis 缓存】Azure Cache for Redis 是否记录具体读/写(Get/Set)或删除(Del)了哪些key呢?
|
3月前
|
存储 NoSQL Redis
Redis第七弹-Set与ZSET基本操作,Set(集合特点)SADD key member(注意这个key,必须是你自定义名字,不能用key)​编辑SMEMBERS key-查询所有的key
Redis第七弹-Set与ZSET基本操作,Set(集合特点)SADD key member(注意这个key,必须是你自定义名字,不能用key)​编辑SMEMBERS key-查询所有的key
|
3月前
|
缓存 NoSQL 关系型数据库
Redis第二课,1.set key value(设置对应的key和value)2.get key(得到value值)Redis全局命令(支持很多的数据结构)3.keys(用来查询当前
Redis第二课,1.set key value(设置对应的key和value)2.get key(得到value值)Redis全局命令(支持很多的数据结构)3.keys(用来查询当前
|
4月前
|
Java Android开发
问题:Android requires .class compatibility set to 5.
问题:Android requires .class compatibility set to 5.
22 1
|
4月前
|
API Python Windows
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
343 0
|
存储 PHP
PHP为什么需要设置session_set_cookie_params()函数来配置session的cookie参数?
PHP为什么需要设置session_set_cookie_params()函数来配置session的cookie参数?
171 0
The 'manifest_version' key must be present and set to 2 (without quotes)
The 'manifest_version' key must be present and set to 2 (without quotes)
75 0