Codeigniter flashdata在互联网浏览器和谷歌chrome不工作 [英] Codeigniter flashdata not working in internet explorer and google chrome
问题描述
Codeigniter flashdata在互联网浏览器和chrome不工作,但它正在工作firefox.What可能是这个问题。
在我的控制器: -
$ this-> session-> set_flashdata('login_error','您的用户名或密码不正确。
redirect(base_url()。'admin / login');
在我的视图中
echo'< span>'。$ this-> session-> flashdata('login_error')'< / span>';
在Chrome中,即使我的空白区域,而在firefox它正在显示闪存数据。 p>
在堆栈上有类似的问题,但我找不到任何正在工作的答案。
我解决了我的问题。ie和chrome cookie管理有一些问题。
我更改了'sess_cookie_name' / code>在配置中从
'ci_session'
到'cisession'
和 sess_expiration
从 7200
到 84200
并且它固定。
Codeigniter flashdata not working in internet explorer and chrome but it is working on firefox.What could be the issue?.
In My controller:-
$this->session->set_flashdata('login_error','Your username or password is incorrect.');
redirect(base_url().'admin/login');
In My view
echo '<span>'.$this->session->flashdata('login_error').'</span>';
In Chrome and ie i'm getting blank span whereas in firefox it is displaying flash data.
There are similar questions on the stack but i could not find any answer which are working.
I solved my problem.There was some issue with ie and chrome cookie management.
I change the 'sess_cookie_name'
in config from 'ci_session'
to 'cisession'
and sess_expiration
from 7200
to 84200
and it got fixed.
这篇关于Codeigniter flashdata在互联网浏览器和谷歌chrome不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!