Home >Backend Development >PHP Tutorial >Recommend several ways to implement page jump in PHP_PHP tutorial

Recommend several ways to implement page jump in PHP_PHP tutorial

WBOY
WBOYOriginal
2016-07-15 13:32:16995browse

1. The first method of page jump using PHP

  1. php
  2. header("Location:http:
    //www.baidu.com") ;
  3. ?>

header() is a php built-in function, used to implement page jumps.

2. The second method of page jump using PHP: Use

<ol class="dp-xml">
<li class="alt"><span><span>jsecho "  </span></span></li>
<li>
<span class="tag"><</span><span> </span><span class="tag-name">script</span><span> </span><span class="attribute">language</span><span>=</span><span class="attribute-value">"javascript"</span><span class="tag">></span><span>";  </span>
</li>
<li class="alt">
<span>echo "</span><span class="attribute">location.href</span><span>=</span><span class="attribute-value">'www.abidu.com'</span><span>";  </span>
</li>
<li><span>echo "  </span></li>
<li class="alt">
<span class="tag"><</span><span> /script</span><span class="tag">></span><span>"; </span>
</li>
</ol>

3. The third method of page jump using PHP (Use HTML method to achieve page jump. This method is more practical and can set the refresh time. It is recommended. )

<ol class="dp-xml">
<li class="alt"><span><span>echo  </span></span></li>
<li>
<span> ("</span><span class="attribute">http-equiv</span><span>='refresh'<br></span><span class="attribute-value">content</span><span>=0;</span><span class="attribute">URl</span><span>=</span><span class="attribute-value">'hehe.html'</span><span>"); </span>
</li>
</ol>

1. If you want to jump to other pages, you can add the parameter index.php?id. =4action=add2. After taking out other pages, the parameters

<ol class="dp-xml">
<li class="alt"><span><span>$</span><span class="attribute">id</span><span> = $_GET[id]; </span></span></li>
<li class="alt"><span><span>$</span><span class="attribute">action</span><span>=$_GET[action]; </span></span></li>
</ol>

are the specific methods of PHP to implement page jump.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446160.htmlTechArticle1. The first way to implement page jump in PHP? php header(Location:http: //www.baidu .com); ? header() is a built-in function in PHP, used to implement page jumps. 2. The second method of page jump using PHP...
Statement:
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