且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Codeigniter 错误会话数据库

更新时间:2023-02-08 16:51:47

我遇到了同样的问题,我花了一段时间才找到解决方案.从表面上看,指令告诉你只加载会话驱动程序,一切都很酷,但是如果你往下看 CodeIgniter 文档的数据库驱动程序部分,你会发现需要配置 $config['sess_save_path'] 变量在您的 config.php 文件中.例如:

I had this same problem and it took me a while to find the solution. On the surface, the instructions tell you to just load the session driver and everything is cool, but if you look down in the Database Driver section of the CodeIgniter documentation, you find that you need to configure the $config[‘sess_save_path’] variable in your config.php file. For example:

 $config[‘sess_save_path’] = ‘ci_sessions’

http://www.codeigniter.com/userguide3/library/sessions.html#initializing-a-session

当然,您还必须在数据库中设置 ci_sessions 表,但这为我解决了缺少表名的问题.

Of course, you have to have the ci_sessions table set up in your database as well, but this solved the missing table name for me.