Skip to content

Instantly share code, notes, and snippets.

@jakeasmith
Created August 22, 2014 19:08
Show Gist options
  • Save jakeasmith/58764c5ab84f7672f381 to your computer and use it in GitHub Desktop.
Save jakeasmith/58764c5ab84f7672f381 to your computer and use it in GitHub Desktop.
Terminating a session early
<?php
class BaseAction
{
protected $close_session = true;
public function __construct()
{
session_start();
if($this->close_session)) {
session_write_close();
}
}
// ..
}
<?php
class SomeAction
{
protected $close_session = false;
// ..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment