how to set session expire(session timeout) using php code
Answer Posted / er
$sessdir = ini_get('session.save_path');
if (!is_dir($sessdir)) { mkdir($sessdir, 0777); }
ini_set('session.save_path', $sessdir);
ini_set('session.gc_maxlifetime', 1);
| Is This Answer Correct ? | 34 Yes | 23 No |
Post New Answer View All Answers
How do I stop php artisan serve in windows?
Is php closing tag necessary?
What is the purpose of constant() function?
How many types of session are there?
How to enable error reporting in php?
What do you mean range() in php?
What is the difference between php and core php?
What is the difference between Session and Cookie?
Is php class name case sensitive?
Which character is used to match exactly one character?
What is the definition of a session?
What is lazy loading in php?
What is uniqid php?
What are the benefits of using queries?
Does php have block scope?