php 判断网站是http还是https
//判断是http还是https $http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://'; //全路径 $urls = $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']