Add .gitignore and project files
This commit is contained in:
22
logout.php
Normal file
22
logout.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// Удаляем все данные сессии
|
||||
$_SESSION = array();
|
||||
|
||||
// Если требуется уничтожить сессию, также удаляем сессионные cookie
|
||||
if (ini_get("session.use_cookies")) {
|
||||
$params = session_get_cookie_params();
|
||||
setcookie(session_name(), '', time() - 42000,
|
||||
$params["path"], $params["domain"],
|
||||
$params["secure"], $params["httponly"]
|
||||
);
|
||||
}
|
||||
|
||||
// Уничтожаем сессию
|
||||
session_destroy();
|
||||
|
||||
// Перенаправляем на главную
|
||||
header("Location: cite_mebel.php");
|
||||
exit();
|
||||
?>
|
||||
Reference in New Issue
Block a user