/** * Get the instance, or set up a new one. * @return MongoSession */ public static function instance() { if (self::$instance) { return self::$instance; } //set up a proper instance self::$instance = new self(); return self::$instance; }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ require_once 'base.php'; global $config; MongoSession::config($config["session_config"]); MongoSession::init(); session_start(); // // //if (isset($_SESSION["hit"])) { // $hit = $_SESSION["hit"]; // $hit++; // if ($hit >= 10) { // // $_SESSION = array(); // // if (isset($_COOKIE[session_name()])) { // $params = session_get_cookie_params(); // setcookie(session_name(), '', 1, $params['path'], $params['domain'], $params['secure'], isset($params['httponly'])); // } // // session_destroy(); // // header("Location: http://localhost:8000"); // exit(); // }
public static final function Close() { self::$session = null; return TRUE; }