CCSWebsite/console/logout.php
2025-06-17 01:43:15 +00:00

14 lines
249 B
PHP
Executable File

<?php
session_start();
// 清除会话
unset($_SESSION['user_id']);
unset($_SESSION['username']);
// 清除 Token Cookie
setcookie('auth_token', '', time() - 3600, '/');
// 跳转到登录页面
header("Location: ../auth/");
exit();