PHP头条
热点:

header("Location:index.php")页面跳转有关问题


header("Location:index.php")页面跳转问题
新手求教!!!急!
if($password == $row["password"])
 {
  $_SESSION["admin"]=1;
  $_SESSION["username"]=$username;
  header("Location:index.php");
  exit;
 }
执行这段代码后页面转为空页面,但重新从链接访问这个页面是它又是已经登录的界面(也就是它已经转到index.php了),这是为毛啊???

------解决方案--------------------
必须将浏览器关闭,重新打开后,session才会更新。标签页中,session实际没有销毁。

加个退出页面:
PHP code

//logout.php
session_start();
session_destroy();
header("Location:index.php");

------解决方案--------------------
index界面没有东西? 你最好将表单页面和处理页面分开写。

www.phpzy.comtrue/phprm/50244.htmlTechArticleheader(Location:index.php)页面跳转有关问题 header("Location:index.php")页面跳转问题 新手求教!!!急! if($password == $row["password"]) { $_SESSION["admin"]=1; $_SESSION["username"]=$username; header("Location:index....

相关文章

PHP之友评论

今天推荐