首页 > 开发 > PHP > 正文

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

2024-05-04 23:11:58
字体:
来源:转载
供稿:网友

复制代码 代码如下:


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";
}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表