PHP刷新当前页面? [英] php refresh current page?
本文介绍了PHP刷新当前页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个页面,
如果一个变量被设置(在一个会话中)
它将执行一个动作,
然后它取消设置会话。
现在必须刷新自己。
这就是我卡住的地方。 p>
有没有一种方法可以将当前网页的确切网址?
还是有一个功能可以做到这一点?
所以 header('location:???');
解决方案
header('Location:'。$ _ SERVER ['REQUEST_URI']);
I have a page which,
If a variable is set(in a session) it will do an action, then it unsets the session.
Now it has to refresh itself.
This is where i am stuck.
Is there a way to get the exact url to the current page?
or is there a function to do this?
so header('location: ???');
解决方案
header('Location: '.$_SERVER['REQUEST_URI']);
这篇关于PHP刷新当前页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文