I set the Ini_set ("Session.gc_maxlifetime", 1); The session is valid for 1 minutes.
I'll be back in a minute. test.php in the same folder how can I get the value of $_session["name"? Should it be a null value?
It's still available for 2 hours.
What else do I need to set up?
This is my test.php code.
Reply to discussion (solution)
I'm a novice too.
If you don't mind, give me a little advice, or try it.
Put
Ini_set ("Session.gc_maxlifetime", 1);
Put to Session_Start (); The back
I'm a novice too.
If you don't mind, give me a little advice, or try it.
Put
Ini_set ("Session.gc_maxlifetime", 1);
Put to Session_Start (); The back
Have you done this before?
I'm a novice too.
If you don't mind, give me a little advice, or try it.
Put
Ini_set ("Session.gc_maxlifetime", 1);
Put to Session_Start (); The back
Have you done this before?
I've tried it before.
It does make time work.
But in other code has also been modified, do not know whether this is the most direct reason
Sessions time
Modified time is not enough, PHP has a GC mechanism, that is, garbage collection mechanism, the default is only 1/100 or 1/1000 of the probability of the session file after the expiration time to delete files, you can modify Session.gc_divisor = 1,session.gc_ Probability = 1, this is the session file expires, the session initialization action triggered by the session file has a 100% probability of being deleted