美文网首页
Todolist--(5)注销

Todolist--(5)注销

作者: snoweek | 来源:发表于2015-05-15 21:51 被阅读25次

    logout.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
    <head>
    <title>注销页面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
        <body>
            <?php
            session_start();
            if(empty($_SESSION['username'])){
                header("http://127.0.0.1/sunyan2015/013/login.php");
            }else{
                $_SESSION=array();
                session_destroy();
                setcookie('phpsessid','',time()-3600);
            }
            echo'你已经注销成功';
            ?>
            <br />
            <a href="login.php">登录</a>
            <br />
            <a href="index.php">返回首页</a>
        </body>
    </html>
    

    相关文章

      网友评论

          本文标题:Todolist--(5)注销

          本文链接:https://www.haomeiwen.com/subject/mjkkqttx.html