时间:2021-07-01 10:21:17 帮助过:3人阅读
PHP跳转代码默认文档设置1 :
PHP跳转代码默认文档设置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
- {}
- ?>
以上就是PHP跳转代码的具体代码实现方法。
http://www.bkjia.com/PHPjc/446165.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446165.htmlTechArticlePHP跳转代码默认文档设置1 : ?php switch($_SERVER[HTTP_HOST]) { casewww.a.com: header(location:a/index.php); break; casewww.b.com: header(location:b/index.php); break; case...