不管你是PHP新手還是PHP大拿,看看下面代碼如何運行:
if(TRUE) { header("Location: www.51cto.com"); } header("Location: www.sina.com.cn");
你肯定會說,我們進入了51CTO的站點。
NO!實際情況卻是你進入了新浪!
要進入51CTO,你得這樣:
if(TRUE) { header("Location: exit(); } header("Location: www.sina.com.cn");
呵呵!
不管你是PHP新手還是PHP大拿,看看下面代碼如何運行:
if(TRUE) { header("Location: www.51cto.com"); } header("Location: www.sina.com.cn");
你肯定會說,我們進入了51CTO的站點。
NO!實際情況卻是你進入了新浪!
要進入51CTO,你得這樣:
if(TRUE) { header("Location: exit(); } header("Location: www.sina.com.cn");
呵呵!