📄 logout.php
字号:
<?php// include function files for this applicationrequire_once('bookmark_fns.php'); session_start();$old_user = $_SESSION['valid_user']; // store to test if they *were* logged inunset($_SESSION['valid_user']);$result_dest = session_destroy();// start output htmldo_html_header('Logging Out');if (!empty($old_user)){ if ($result_dest) { // if they were logged in and are now logged out echo 'Logged out.<br />'; do_html_url('login.php', 'Login'); } else { // they were logged in and could not be logged out echo 'Could not log you out.<br />'; }}else{ // if they weren't logged in but came to this page somehow echo 'You were not logged in, and so have not been logged out.<br />'; do_html_url('login.php', 'Login');}do_html_footer();?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -