function is_HTTPS(){ //判断是不是https
if(!isset($_SERVER['HTTPS'])) return FALSE;
if($_SERVER['HTTPS'] === 1){ //Apache
return TRUE;
}elseif($_SERVER['HTTPS'] === 'on'){ //IIS
return TRUE;
}elseif($_SERVER['SERVER_PORT'] == 443){ //其他
return TRUE;
}
return FALSE;
}
if(!isset($_SERVER['HTTPS'])) return FALSE;
if($_SERVER['HTTPS'] === 1){ //Apache
return TRUE;
}elseif($_SERVER['HTTPS'] === 'on'){ //IIS
return TRUE;
}elseif($_SERVER['SERVER_PORT'] == 443){ //其他
return TRUE;
}
return FALSE;
}