Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The implementation of PHP Jump Code

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report