Codeigniter - Handle Sessions without cookies

北慕城南 提交于 2019-12-08 08:25:33

In CodeIgniter 3 the session library doesn't use cookies. In previous CodeIgniter versions “cookie driver” was the only option and the developers of CI have received negative feedback on not providing that option. Listening to feedback from the community, cookie driver was dropped because it is unsafe.
In CI 3 the Session library comes with 4 drivers, or storage engines, that you can use: files, database, redis, memcached.

www.codeigniter.com/userguide3/libraries/sessions.html#session-drivers

Should state, that using params in that way would probably not be a good idea, and I've never heard of a plugin doing that. You'd probably have to deal with routing issues if you did to begin with. However, CI actually gives you a way to store session information in your database. Check out the documentation, it's easy to set up: http://codeigniter.com/user_guide/libraries/sessions.html

This is probably the better way to go, if you don't want to rely on cookies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!