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
What is the difference between for and foreach in php?
How to assigning a new character in a string?
Tell me how can we automatically escape incoming data?
Which function gives us the number of affected entries by a query?
What are the methods to submit form in php?
What exactly is validating and sanitizing?
When should you use a stored procedure?
Why php is widely used?
Tell me what type of operation is needed when passing values through a form or an url?
Differentiate between require and include?
How to list all values of submitted fields?
Is php front end or back end?
How to redirect a page in php?
Is php session id unique?
What is list function with their uses.