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 final class and final method in php?
Is php a strongly typed language?
What is array filter php?
How do I check if a given variable is empty?
A process can run only in the background. State Whether True or False?
What is final in php?
Which is useful for method overloading?
What's php?
What is magic function in php?
How many escape sequences are recognized in single-quoted strings?
Are there regular expressions in php?
How should a model be structured in mvc?
Explain what is the main difference between require() and require_once()?
Explain me difference between mysql_connect and mysql_pconnect?
What is PHP's configuration file called?