开发者

I want the PHP header to redirect the whole page, not just the div [closed]

开发者 https://www.devze.com 2023-03-05 20:50 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in t开发者_运维知识库ime,or an extraordinarily narrow situation that is not
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in t开发者_运维知识库ime, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

Greetings,

I'm using the following command..

header("location:login.php");

However, when it executes, it only affects the DIV it's currently in. How do I make it affect the whole page?

Many thanks in advance.


it should not unless it executes inside an iframe.


If you want it to affect the whole page, why didn't you just put it at the beginning of the file?

Alternatively, if you want to redirect a page, use can also use Javascript to handle that for you, i.e.

<div id="whatever"><script>window.location = 'login.php';</script></div>
0

精彩评论

暂无评论...
验证码 换一张
取 消