重定向localhost / dashboard

时间:2018-06-25 08:38:06

标签: php

我的个人站点存在问题(使用xampp);每当我以虚构的用户身份登录时执行注销时,都会重定向到localhost / dashboard。您能告诉我如何解决吗?

这是我的“注销”代码:

<?php   /** --- logout.php --- **/
    require_once 'createSession.php';
    require_once 'https.php';

    if(!isset($loggedIn) || (!$loggedIn)) {
        $result = "<h2>You are not logged in!</h2>";
        if(isset($TimeoutExpired) && ($TimeoutExpired))
            $result = $result."<p>Timeout expired! You have not interacted with our server for too much time!</p>";
    }
    else {
        destroySession();
        echo "<h2>You have been successfully logged out.</h2>";
        $goodbye = true;
    }

    $loggedIn = false;
    header("Location: index.php");
?>

其中“ index.php”是我的主页,它在此文件的同一文件夹中 谢谢!

0 个答案:

没有答案