I used session_set_save_handler in my program
and I wrote down:
<?
//.........other functions
//.........such as "open", "close",
//......... "read", "write", "destroy
function gc ($maxlifetime) {
global $sess_save_path, $sess_session_name;
$sess_file = "$sess_save_path/sess_$id";
return(@unlink($sess_file));
}
session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
session_start();
$abc="ABCDEFG";
$zzz="zzzzzzz";
session_register("abc");
session_register("zzz");
?>
But I found the session file on the server still remains on the server long after the
IE closed,why? I wrote the clean up code
in the function gc() but why didn't the server clean the session files up?
I've set the Session.gc_maxlifetime=10
and session.save_handler=user
so I don't know where is the problem?
with great appreciation to who can give
me any tips!