Home > Backend Development > PHP Problem > How to return to the previous level in php

How to return to the previous level in php

藏色散人
Release: 2023-03-14 06:16:02
Original
5629 people have browsed it

php implementation method of returning to the previous layer: 1. Implemented through "header(location:xx);"; 2. Implemented through "header(location:.getenv("HTTP_REFERER"));"; 3. Use "history.go(-1)" to implement.

How to return to the previous level in php

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

How to return to the previous level in php?

3 effective methods for php to implement the function of returning to the previous page

header(location:你的上一页的路径);   //   注意这个函数前不能有输出    
header(location:.getenv("HTTP_REFERER"));   //   返回其调用页面  
echo"<script>alert(&#39;随便写点什么&#39;);history.go(-1);</script>";
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to return to the previous level in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template