The implementation of PHP Jump Code
This article mainly explains "PHP jump code implementation method", the explanation content in the article is simple and clear, easy to learn and understand, please follow the small series of ideas slowly in-depth, together to study and learn "PHP jump code implementation method" bar!
PHP Skip Code Default Document Settings 1 :
< ?php switch ($_SERVER["HTTP_HOST"]) { case "www.a.com": header("location:a/index.php"); break; case "www.b.com": header("location:b/index.php"); break; case "www.c.com": header("location:c/index.php"); break; } ?>PHP Skip Code Default Document Settings 2 :
< ?php $HTTP_HOST=$_SERVER['HTTP_HOST']; if(($HTTP_HOST=="a.com")or ($HTTP_HOST=="www.a.com")) {Header("Location:/index.html"); } elseif(($HTTP_HOST=="b.net")or ($HTTP_HOST=="www.b.net")) {Header("Location: /kangbite/"); } elseif(($HTTP_HOST=="c.com")or ($HTTP_HOST=="www.c.com")) {Header("Location: /c/"); } else {} ?>Thank you for reading, the above is the "PHP jump code implementation method" of the content, after the study of this article, I believe we have a deeper understanding of the PHP jump code implementation method, the specific use of the situation also needs to be verified. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!