Home > Backend Development > PHP Tutorial > Several implementation techniques for PHP page jump

Several implementation techniques for PHP page jump

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:10:57
Original
798 people have browsed it
<?php

//第一种
//  $url = "http://www.weisico.com";  
// echo "<script language=&#39;javascript&#39; type=&#39;text/javascript&#39;>";  
// echo "window.location.href='$url'";  
// echo "</script>";  


// echo $url = "testmysql.php";
// echo "<SCRIPT LANGUAGE=JavaScript>";  
// echo "location.href='$url'";  
// echo "</SCRIPT>";

//第二种   
// $url = "http://www.weisico.com"; ?> 
<!--- <html> 
// <head>
// <meta charset="utf-8">
// <meta http-equiv="X-UA-Compatible" c />
// <meta http-equiv="refresh" c echo $url; ?>">   
// </head>   
// <body>   
// 页面只停留一秒……   
// </body> 
// </html> -->

//第三种
//重定向浏览器 
header("Location: http://www.weisico.com"); //Location: 后面有一个空格
//确保重定向后,后续代码不会被执行 
exit;
?> 
Copy after login

The above introduces several implementation techniques of PHP page jump, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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