What is the default session time in PHP and how can I
change it?
Answer Posted / archana
ini_set('session.gc_maxlifetime', 14400);
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
add above codes in index.php. it will work.
changing php.ini value is not a good way.it will not work.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is the difference between public, protected and private?
Explain Type hinting in PHP?
Why namespace is used in php?
Write a program to get second highest number in an array using php?
How can you pass a variable by reference?
Explain the difference between static and dynamic websites?
What is super keyword in php?
What is the php function that removes the first element of the array and returns it?
Is laravel better than codeigniter?
What is the use of the function 'imagetypes()'?
What is strstr php?
What is the main function of php?
How do I install php and apache on windows 10?
What is the difference between == and === in php?
How do you display the output directly to the browser?