当前位置:Gxlcms > PHP教程 > 如何使用php判断服务器是否是HTTPS连接

如何使用php判断服务器是否是HTTPS连接

时间:2021-07-01 10:21:17 帮助过:12人阅读

代码如下:
if ($_SERVER['HTTPS'] != "on") {
 echo "This is not HTTPS";
}else{
 echo "This is HTTPS";
}if ($_SERVER['HTTPS'] != "on") {
 echo "This is not HTTPS";
}else{
 echo "This is HTTPS";
}

人气教程排行