Skip to content

Instantly share code, notes, and snippets.

@dammyammy
Created March 12, 2015 20:55
Show Gist options
  • Select an option

  • Save dammyammy/14fd8a69cc6df945819f to your computer and use it in GitHub Desktop.

Select an option

Save dammyammy/14fd8a69cc6df945819f to your computer and use it in GitHub Desktop.
Usage Of Session Handler Class
$session = new SecureSessionHandler('cheese');
ini_set('session.save_handler', 'files');
session_set_save_handler($session, true);
session_save_path(__DIR__ . '/sessions');
$session->start();
if ( ! $session->isValid(5)) {
$session->destroy();
}
$session->put('hello.world', 'bonjour');
echo $session->get('hello.world'); // bonjour
@dammyammy
Copy link
Copy Markdown
Author

call $session->isValid();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment