根据环境变量调整行为
$version =(isset($_SERVER['SITE_VERSION']) ? $_SERVER['SITE_VERSION'] : 'guest');
//如果用户未能正确登录,重定向到http://guest.example.com
if('members' == $version){
if(!authenticate_user($_POST['username'],$_POST['password'])){
header('Location: http://guest.example.com/');
exit;
}
}
include_once "${version}_header";// 加载定制首部