你的 代码呢???没有代码很难解决:事例代码:
<?php
if($_GET['mode']=="quit")//接收mode值并判断
{
//显示窗体
}
else
{
session_unset();//清空SESSION,删除的话用destroy
header("location: http://网站首页");
}

解决方案 »

  1.   

    事例代码:
    <?php
    if($_GET['mode']=="quit")//接收mode值并判断
    {
    //显示窗体
    }
    else
    {
    session_unset();//清空SESSION,删除的话用destroy
    header("location: http://网站首页");
    }
      

  2.   

    代码如下:
    <?php
    session_start();
    if($_GET["mode"]=="quit"){
    $_SESSION["uid"]="";
    $_SESSION["pwd"]="";
    header("location:../index.php");
    exit();
    }
    ?>
    好像如果没有传递MODE到这个页面的话,会报错,否则不会,该怎么办?
      

  3.   

    <?php 
    session_start(); 
    if(isset($_GET['mode']) && $_GET['mode']=='quit')

     $_SESSION['uid']=$_SESSION['pwd']=null; 
     exit(header("location:../index.php")); 

    ?> 
      

  4.   

    顶4楼 
    if(isset($_GET['mode']) && $_GET['mode']=='quit')
      

  5.   

    能解释一下
    isset($_GET['mode']) && $_GET['mode']=='quit'
    是什么意思吗?
      

  6.   

    isset($_GET['mode']) && $_GET['mode']=='quit' 
    Get里面有mode,然后mode一定要是quit才成立!