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

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

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

代码如下:
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";
}

人气教程排行