0

为什么标头(“位置:地址”);销毁会话后返回此错误firefox!:|

The connection was reset
  The connection to the server was reset while the page was loading.

  The site could be temporarily unavailable or too busy. Try again in a few
    moments.
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

它是我的代码:

if ($cmd == "cwLogOut" or ! is_array ( $cwUserInfo )) {

    if ($_SESSION ['log'] == 1) {
        $msg = $cwlang ['log'] ['user'] . "[" . $cwUserInfo ["username"] . "]" . $cwlang ['log'] ['logout'];
        $asterisk->putLog ( $cwUserInfo ["username"], $cwUserInfo ["fullname"], 6, "logout", $cmd, $msg );
    }

    setcookie ( "cwUserId", $uid, time () - (3600 * 24 * 365), "/" );
    unset ( $_SESSION );
    unset ( $_SESSION ['cwUserId'] );
        session_destroy ();
    header("location:http://cas.local");
}
4

2 回答 2

1

我使用 exit(header("location:http://cas.local"));它,它的工作,坦克每一个。

于 2013-10-19T07:56:36.210 回答
0

是的,尝试使用ob_start()来缓存输出

于 2013-10-19T07:47:38.220 回答