Home  >  Article  >  php教程  >  同一空间绑定多个域名而实现访问不同页面的PHP代码

同一空间绑定多个域名而实现访问不同页面的PHP代码

WBOY
WBOYOriginal
2016-06-13 12:35:471226browse

switch ($_SERVER["HTTP_HOST"]) { 
    case "www1.aspcn.net": 
        header("location:index1.htm"); 
        break; 
    case "www2.aspcn.net": 
        header("location:index2.htm"); 
        break; 
    case "www3.aspcn.net": 
        header("location:index3.htm"); 
...... 继续添加 ...... 
        break; 

?>

Statement:
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
Previous article:mysql建立外键Next article:PHP的中问验证码