Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
<?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();
//    }
Ejemplo n.º 3
0
 public static final function Close()
 {
     self::$session = null;
     return TRUE;
 }