需要在不使用函数头的情况下重定向 url
问题描述:
我需要将我的页面重定向到另一个页面,但我无法使用 header
功能,还有其他方法可以做到吗?
I need to redirect my page to another, but I can't use the header
function, is there any other way to do it?
我需要做的是这样的:
if (test){
---do something---
redirect
} else {
return false
}
谢谢
答
if (test){
---do something---
die("<script>location.href = 'http://www.google.com'</script>");
} else {
return false;
}