summaryrefslogtreecommitdiff
path: root/logout.php
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-18 23:38:15 +0800
committerchai <chaifix@163.com>2022-03-18 23:38:15 +0800
commitb970e38c6cbde1e573c1d7a1d1b1685c1ca5bde1 (patch)
tree1c61a26bf0970ce8fc0b2b11d547b926c403ef82 /logout.php
parentf63d8e742f6f1cd0321acfd9ffcfd71afd6c956d (diff)
*admin login
Diffstat (limited to 'logout.php')
-rw-r--r--logout.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/logout.php b/logout.php
new file mode 100644
index 0000000..9cb285c
--- /dev/null
+++ b/logout.php
@@ -0,0 +1,11 @@
+
+<?php
+session_start();
+// 这种方法是将原来注册的某个变量销毁
+unset($_SESSION['admin']);
+// 这种方法是销毁整个 Session 文件
+session_destroy();
+
+header('Location: '.'login.php');
+
+?>