设置环境变量



根据环境变量调整行为
$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";// 加载定制首部

posted @ 2025-01-12 02:25  kksllss  阅读(16)  评论(0)    收藏  举报