du1108
2013-11-26 16:54
浏览 55
已采纳

php标头位置重定向方法无法正常工作

    <?php
    if(isset($_SESSION['logged_in']))
    {
            header('Location: test.php');
echo "test";
    ?>

    <?php
    }
    else
    {
    ?>
            <a href="#" onclick="CallAfterLogin();"><img src="facebook-login-button.png" border="0" alt="Log in with Facebook"></a>

    <?php } ?>

After the user is login, I visit back to this file, and it just won't redirect. It did appear the echo but not the redirect, I wonder.

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题