如何使用php判断服务器是否是HTTPS连接
(编辑:jimmy 日期: 2024/11/19 浏览:3 次 )
复制代码 代码如下:
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";
}
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";
}
下一篇:使用PHP实现蜘蛛访问日志统计