开发者

Backward and forward buttons on the browser

My localhost works as expected when any links are clicked; however, when i click backward button on the browser, the website is loading the page like forever. I have seen it in many websites. What is causing it? Every scripts starts with the following;

<?php include "base.php"; 
if (!isset($_SESSION['username'])) {
    header('Location: index.php');
    exit();
}?>

Do you t开发者_如何学Chink the reason is about my codes or about localhost? Thanks


If this piece of code is executed on your index.php and $_SESSION['username'] is not set, you end up in a loop of endless redirects. Which would look like 'loading forever'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜