Codeigniter,会话Cookie是否未发送到服务器? [英] Codeigniter, Session Cookie not sent to server?

查看:86
本文介绍了Codeigniter,会话Cookie是否未发送到服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图输出从用户那里获得的cookie,当我在开发者工具中打开网络"部分时,如果我打开请求,则会在 Request Headers中找到cookie,但是当我输出Cookie时

I am trying to output the cookies I get from the user, when I open the network section in the Developer Tools,if I open the request I find the cookie in the Request Headers, but when I am output the cookie

$this->input->cookie();

我正在得到;

array(0) { }

会话配置

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = FCPATH . 'application/ci_sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Cookies配置

$config['cookie_prefix']    = '';
$config['cookie_domain']    = '';
$config['cookie_path']      = '/';
$config['cookie_secure']    = FALSE;
$config['cookie_httponly']  = FALSE;

我正在使用 Codeigniter 3.0.0 ,操作系统 Fedora 27 ,服务器 Apache ,我在不同的浏览器 Chrome Firefox

I am using Codeigniter 3.0.0, OS Fedora 27, Server Apache I tried this on different browsers, Chrome and Firefox

请求标头和响应标头

谢谢.

推荐答案

解决我问题的方法是,用新版本Codeigniter中的新文件夹替换我的Session文件夹.

What solved my problem was replacing my Session folder with a new one from a newer version of Codeigniter.

系统->库-> 会议

这篇关于Codeigniter,会话Cookie是否未发送到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆