作者costbook (CB)
看板PHP
标题网页不会自动重新载入 ... 用header("Location:*")
时间Tue Aug 29 21:13:26 2006
很奇怪,按下登出後的确是登出了,
可是不会重新载入
一开始我是这样写:
function reLoadWeb($direction){
if($direction=="")
$direction="./";
header("Location:$direction");
}
if(@$HTTP_POST_VARS['submit']=="登出")
{
session_unset();
session_destroy();
reLoadWeb($file);
}
後来改成这样:
if(@$HTTP_POST_VARS['submit']=="登出")
{
session_unset();
session_destroy();
header("Location:login.php");
}
还是不行...
我有试过单独一个header("Location:*");
结果是ok的
--
我认识的人愈多,我就愈喜欢狗
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.139.180.193
1F:推 alpe:绝对路径 08/29 21:29
3F:推 alpe:用 $_POST["submit"] 吧. $HTTP_*_VAR 快不行用了 08/29 22:57
4F:→ alpe:还有 @ 在那一整个没意义 08/29 22:58
5F:推 costbook:把 $_POST['']==* 放在if里面会出错 08/30 00:45
6F:推 wa120:用javascript改写吧...用PHP改标头档很容易出问题 08/31 00:24