function logoutAction() { session_abort(); header("location:http://test4.com:81/course_work/auth/login"); }
/** * Сброс сессии * @return \Jugger\Context\Session */ public function abort() { if ($this->isStarted) { session_abort(); $this->isStarted = false; } return $this; }
/** * Set magic. * @param string $key * @param any $value * @return void * @throws Froq\Session\SessionException */ public final function __set(string $key, $value) { if (!isset($_SESSION[$this->name])) { // stop writing first session_abort(); throw new SessionException(sprintf("Session not started yet, call first '%s::start()' or use isset() first!", __CLASS__)); } $_SESSION[$this->name][$key] = $value; }
/** * Aborts the session without writing any declared * values to the storage. * * @return void */ public function abort() { session_abort(); }
public function abort() { if (function_exists('session_abort')) { session_abort(); } }
/** * No more changes in session expected. * Unblocks the sessions, other scripts may start executing in parallel. */ public static function write_close() { if (version_compare(PHP_VERSION, '5.6.0', '>=')) { // More control over whether session data // is persisted or not. if (self::$sessionactive && session_id()) { // Write session and release lock only if // indication session start was clean. session_write_close(); } else { // Otherwise, if possibile lock exists want // to clear it, but do not write session. @session_abort(); } } else { // Any indication session was started, attempt // to close it. if (self::$sessionactive || session_id()) { session_write_close(); } } self::$sessionactive = false; }
public function deslogar() { session_abort('login'); header("Location: ../../../"); die; }
<?php /** * Created by PhpStorm. * User: hp1 * Date: 27-11-2015 * Time: 19:20 */ session_abort(); header("location: http://localhost:63342/webServer1/views/mainPage.php");
/** * Finishes session without saving data. * Thus the original values in session data are kept. * * @throws Flex\SessionException */ public function abort() { if ($this->status == PHP_SESSION_NONE) { throw new SessionException("abort must be called after session start and no active session was found."); } if ($this->status == PHP_SESSION_DISABLED) { throw new SessionException("Sessions are disabled"); } session_abort(); $this->updateStatus(); $this->setActive(); }
function logoutAction() { session_abort(); header("location:http://" . HOST . "/testWork/auth/login"); }