你的 代码呢???没有代码很难解决:事例代码:
<?php
if($_GET['mode']=="quit")//接收mode值并判断
{
//显示窗体
}
else
{
session_unset();//清空SESSION,删除的话用destroy
header("location: http://网站首页");
}
<?php
if($_GET['mode']=="quit")//接收mode值并判断
{
//显示窗体
}
else
{
session_unset();//清空SESSION,删除的话用destroy
header("location: http://网站首页");
}
<?php
if($_GET['mode']=="quit")//接收mode值并判断
{
//显示窗体
}
else
{
session_unset();//清空SESSION,删除的话用destroy
header("location: http://网站首页");
}
<?php
session_start();
if($_GET["mode"]=="quit"){
$_SESSION["uid"]="";
$_SESSION["pwd"]="";
header("location:../index.php");
exit();
}
?>
好像如果没有传递MODE到这个页面的话,会报错,否则不会,该怎么办?
session_start();
if(isset($_GET['mode']) && $_GET['mode']=='quit')
{
$_SESSION['uid']=$_SESSION['pwd']=null;
exit(header("location:../index.php"));
}
?>
if(isset($_GET['mode']) && $_GET['mode']=='quit')
isset($_GET['mode']) && $_GET['mode']=='quit'
是什么意思吗?
Get里面有mode,然后mode一定要是quit才成立!