Have a Snippet?

Keep, track and share your code snippets with your friends



PHP: Session lifetime Share on Vkontakte

Session lifetime. An important point: set a directory to store sessions.

ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'] . '/sessions/'); //Important!
ini_set('session.gc_maxlifetime', 86400);
ini_set('session.cookie_lifetime', 86400);


Tag: PHP, Sessions, Lifetime, Life, DateTime

0 Comments