php怎么实现返回上一层
- 建站笔记
- 2022-05-08
- 512
php实现返回上一层的实现方法:1、通过“header(location:xx);”实现;2、通过“header(location:.getenv("HTTP_REFERER"));”实现;3、使用“history.go(-1)”实现。
本文操作环境:Windows7系统、PHP7.1、Dell G3电脑。
php怎么实现返回上一层?
php实现返回上一页的功能的3种有效方法
header(location:你的上一页的路径); // 注意这个函数前不能有输出 header(location:.getenv("HTTP_REFERER")); // 返回其调用页面 echo"<script>alert('随便写点什么');history.go(-1);</script>";
本文由白琉璃于2022-05-08发表在白琉璃源码网,如有侵权或疑问,请联系我们,谢谢。
本文链接:https://www.bailiuli.com/t/3140.html
发表评论