function is_https() {
if (!empty($_server['https']) &&strtolower($_server['https'])!== 'off') {
return true;
} elseif ( isset($_server['http_x_forwarded_proto']) &&$_server['http_x_forwarded_proto'] === 'https') {
return true;
} elseif (!empty($_server['http_front_end_https']) &&strtolower($_server['http_front_end_https'])!== 'off') {
return true;
}else{
return false;
}
}
- 編程問答
- 答案列表
php獲取當前網頁地址[朗讀]
加入收藏