mismatch_logout 退出

<?php 
require_once('comment/startsession.php');
$title = "log Out";
require_once('comment/header.php');
if (isset($_SESSION['user_id'])) {
    //清除session值
    $_SESSION = array();
    //删除cookie
    if (isset($_COOKIE['user_id']) || isset($_COOKIE['username'])) {
        setcookie('user_id','',time() -3600);
        setcookie('username','',time() -3600);
    }
    session_destroy();
    echo '<p class="pass">log out seccussful!<p>';
    
}
echo '<p><a href="mismatch_login.php">Login</a>&#10084</p><br>';
echo '<p><a href="mismatch_index.php">home</a>&#10084</p>';


require_once('comment/footer.php');
 ?>

上一篇:php – Sublimelinter – 如何在出错时禁用窗口弹出窗口


下一篇:paddlehub(3)