2010-04-20 82 views

回答

5

您可以。如果这是您想要解决问题的方式,那么您只需确定如何确定运行代码的服务器。你可以尝试使用域名:

if ($_SERVER['SERVER_NAME'] == 'mydomain1.com') { 


} else { 
    // default 

} 
6

当然:

<?php 

if (/* some conditions */) { 
    require_once('some.file.php'); 
} else { 
    require_once('another.file.php'); 
} 

?>