这是我的配置:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 86400; //1 day
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 86400; //1 day
我不知道为什么我的session_id会在处理某些记录时发生变化。
这里是session_id没有改变的记录的错误日志(这是正确的)(AJAX帖子):
[Thu Mar 19 14:26:14.080447 2015] [:error] [pid 7902] [client 192.168.10.126:58565] f83e35227ac23f60d175dbbb333f9554 <----- session Id (Ajax), referer: http://192.168.10.126/consumer/ignite.php/update_listings_controller?listingId=1129
[Thu Mar 19 14:26:15.516590 2015] [:error] [pid 7902] [client 192.168.10.126:58565] f83e35227ac23f60d175dbbb333f9554 <----- session Id (Ajax), referer: http://192.168.10.126/consumer/ignite.php/update_listings_controller?listingId=1129
这里是session_id更改的记录的错误日志(这是不正确的)(AJAX帖子):
[Thu Mar 19 14:25:42.260545 2015] [:error] [pid 7590] [client 192.168.10.126:58512] 3ff5478a950d3f0d5d71f3c72d1102a0 <----- session Id (Ajax), referer: http://192.168.10.126/consumer/ignite.php/update_listings_controller?listingId=28453
[Thu Mar 19 14:25:47.322896 2015] [:error] [pid 7511] [client 192.168.10.126:58521] 5a7f2424717505a2a68ffe717e56971b <----- session Id (Ajax), referer: http://192.168.10.126/consumer/ignite.php/update_listings_controller?listingId=28453
我对两者使用相同的步骤。当我在后端处理某些记录时,我不确定session_id何时以及为何会发生变化。我相信我的配置是正确的。
其他信息:
var opt;
function showPreviewMode(div,section,editmode){
showModalElement('pleasewait');
jQuery.ajax({
url:"update_listings_controller/get_listing_content/<?php echo $this->input->get('listingId'); ?>/"+section+"/"+editmode,
success:function(data){
jQuery(div).html(data);
hideModalElement('pleasewait');
masking();
if(section == 3){
opt = new OptionTransfer("serviceArea", "serviceAreaIds");
opt.setAutoSort(true);
opt.setDelimiter(",");
opt.saveNewRightOptions("newRight");
var dol = new DynamicOptionList("serviceAreaLeft");
opt.init(document.whoDoTheyServe);
}else if(section== 4){
disAbledFee();
disabledMeds();
privatePay();
}else if(section== 5){
checkDay();
waitList();
}
}
});
}
答案 0 :(得分:0)
这正是我所做的:
而不是调用$this->session->userdata('session_id'),
我只是这样称呼:
session_id();
他们没有相同的价值,session_id();
无论如何都没有改变。