“Wartość sesji nie została usunięta PHP” Kod odpowiedzi

Sesja Usuń PHP

session_destroy(); // To delete whole session
// OR
unset($_SESSION['myVar']); // To delete a session var
Allen

Sesja Unset w PHP

session_unset();    //Destrol all session variables
Wicked Wolf

Wartość sesji nie została usunięta PHP


All of a sudden neither session_destroy() nor $_SESSION=[] were sufficient to log out. I found the next to work:
<?php
setcookie(session_name(), session_id(), 1); // to expire the session
$_SESSION = [];
?>

Colorful Cowfish

Odpowiedzi podobne do “Wartość sesji nie została usunięta PHP”

Pytania podobne do “Wartość sesji nie została usunięta PHP”

Więcej pokrewnych odpowiedzi na “Wartość sesji nie została usunięta PHP” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu