需要在不使用函数头的情况下重定向 url [英] need to redirect url without using the function header
本文介绍了需要在不使用函数头的情况下重定向 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;
}
这篇关于需要在不使用函数头的情况下重定向 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文