php header Location当前页面

header("Location:当前页面");

怎么写

第1个回答  2009-11-04
header("Location: t.html");
注意:":"后面要有一个空格,t.html页面就是当前页面
第2个回答  推荐于2016-06-28
你输出
<?php
print_r($_SERVER);

看一下就知道当前页面是哪个了!

绝对的就是$_SERVER[SCRIPT_FILENAME]

相对的就是$_SERVER[PHP_SELF]本回答被提问者采纳
第3个回答  2009-11-04
header("Location:".$_SERVER['PHP_SELF']);
相似回答