<?php private function __construct() { if(!$this->test()) { $nowa_sesja=false; if($this->get("activity")) { if(!$nowa_sesja) { { $this->destroy(); } } } else if ($this->get("loggedin")) { $nowa_sesja=true; } } $this->id = $this->get("id"); } ?>
Nie chcę być tu zależny od ustawień serwera dot. trwania sesji, więc napisałem swój mechanizm. Ale dajcie znać, czy wszystko wygląda ok. Klasa Sesja() jest singletonem.