如何在导航栏中添加重新加载按钮而不违反会话?

时间:2015-03-19 18:55:36

标签: php html5 reload

所以我试图通过下面代码中的导航栏元素重新加载:

<div class = "navbar navbar-default navbar-static-top">
            <div class ="container">
                <a href="settings.php" class = "navbar-brand" >
                <img class = "navbar-brand"   style="padding: 0.5em;width: 3.8em; height: 3.8em; float: left; margin-top: -1.25em" src="menuconreal.png">
                </a>
                <div class = "collapse navbar-collapse navHeaderCollapse">
                    <ul class = "nav navbar-nav navbar-right">
                        <li><a href = "login.php">RELOAD</a></li>
                        <li><a href = "index.php">LOG OUT</a></li>
                    </ul>
                </div>
            </div>
        </div>

但是在按下重新加载时,我收到错误&#34;您无权查看此页面&#34;这可能是由于会话违规造成的。那么我该如何解决呢?

1 个答案:

答案 0 :(得分:1)

<div class = "navbar navbar-default navbar-static-top">
        <div class ="container">
            <a href="settings.php" class = "navbar-brand" >
            <img class = "navbar-brand"   style="padding: 0.5em;width: 3.8em; height: 3.8em; float: left; margin-top: -1.25em" src="menuconreal.png">
            </a>
            <div class = "collapse navbar-collapse navHeaderCollapse">
                <ul class = "nav navbar-nav navbar-right">
                    <li><a onclick="window.location.reload();">RELOAD</a></li>
                    <li><a href = "index.php">LOG OUT</a></li>
                </ul>
            </div>
        </div>
    </div>