public static function start($db, $table) { if (self::$instane == NULL) { global $_G; self::$instane = new Session(); self::$instane->table = $table; self::$instane->db = $db; session_set_save_handler(array(self::$instane, "_open"), array(self::$instane, "_close"), array(self::$instane, "_read"), array(self::$instane, "_write"), array(self::$instane, "_destroy"), array(self::$instane, "_gc")); if (!empty($_COOKIE['PHPSESSID'])) { session_id($_COOKIE['PHPSESSID']); } session_start(); } return self::$instane; }