예제 #1
0
 public static function start()
 {
     if (isset(self::$id)) {
         return self::$id;
     }
     self::$fs = new NativeFS("/tmp/");
     self::$j = new Services_JSON();
     $idname = "mysessionID";
     if (isset($_COOKIE[$idname])) {
         self::$id = $_COOKIE[$idname];
     } else {
         self::$id = rand(1, 99999999);
         setcookie($idname, self::$id, time() + 60 * 60 * 24 * 30 * 6);
     }
     self::load();
 }