1
2
3
4
//自动跳转https
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on' ){
header('Location: https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);exit();
}