<?php //第一种 // $url = "http://www.weisico.com"; // echo "<script language='javascript' type='text/javascript'>"; // 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; ?>
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.