logout.php

来自「php源码 php源码参考」· PHP 代码 · 共 38 行

PHP
38
字号
<?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 + =
减小字号Ctrl + -
显示快捷键?