PHP header函数的用法辨析,有点意思
不管你是PHP新手还是PHP大拿,看看下面代码如何运行:if(TRUE)
{
header("Location: www.运维网.com");
}
header("Location: www.sina.com.cn"); 你肯定会说,我们进入了运维网的站点。
NO!实际情况却是你进入了新浪!
要进入运维网,你得这样:
if(TRUE)
{
header("Location:
exit();
}
header("Location: www.sina.com.cn");
呵呵!
页:
[1]