<?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(); // }
/** * Set the configuration. * @var $config array * @return null */ public static function config(array $config = array()) { //configs self::$config = array_merge(self::$config, $config); }