我觉得应该是超时的原因吧!
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; WARNING: Your filesystem must store access times. Windows FAT does
; not. So, see session_set_save_handler() and write your own
; session handler with a different mechanism for cleaning up sessions.
session.gc_maxlifetime = 14400 ;等于三个小时。; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.
; For example, the following script would is the equivalent of
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; WARNING: Your filesystem must store access times. Windows FAT does
; not. So, see session_set_save_handler() and write your own
; session handler with a different mechanism for cleaning up sessions.
session.gc_maxlifetime = 14400 ;等于三个小时。; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.
; For example, the following script would is the equivalent of
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
解决方案 »
- 【100分】mysql能否根据多列确定唯一?navicat有没有直观的操作方法?
- 数据存储和程序设计的疑问
- 大家有用MyEclipsePHP的么?怎么使http://localhost/改为默认地址为http://localhost:8081/
- socket遇到的小部
- PHP文件上传问题
- session 变量太多的问题
- php 和windows2000iis + sqlserver2000 结合真的不好吗?(需要了解优缺点)
- 高分问题!!!!!!!!!怎样得到当前的星期?并把它转化为int?谢谢了,请给出代码我给高分
- 如何得到我想要的date格式
- 如何给现有的Word加水印?
- 连不上mssql!救命!`
- 请问这个sql语句哪里错了?
-----------test.php---------
<?
session_start();
session_register("theTempVar");
$theTempVar = "This is a test";
echo $theTempVar;
?>
你多开几个窗口,打开 %dir%/test.php
你再看看存放session临时文件的目录下,是否有多个sess_xxxxxxxx文件;
无论你是否关闭部分浏览器,你看一下,它们什么时候会消失……试后请告诉结果!
我目前还没有办法进一步去测试,因为session不正常多数是发生在,有几个用户登入操作我的session时就会不正常,现在晚上没有人登入我的机器。