how set session expire time in php?

Answer Posted / prakash.matte

Question is not for ini file and not for unsetting, it is
for changing the session life time from php file.

ini_set("session.gc_maxlifetime", number_of_seconds);

We can override the php.ini settings (if we don't have
access) from php file using ini_set()

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we can retrieve the data in the result set of mysql using php?

527


What are the differences between session and cookie?

524


What are php loops?

535


What is http get and post?

535


What is laracast?

586






Is it more secure to use cookies to transfer session ids?

537


What is a php class?

541


What is the use of mysql_real_escape_string() function?

521


Explain what is the static variable in function useful for?

531


Whether it is possible to share a single instance of a memcache between multiple php projects?

536


Is php worth learning in 2019?

515


How send email using php?

542


Define object-oriented methodology?

576


What is constructor and destructor?

534


Is php faster than python?

564