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

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

时间:2021-07-01 10:21:17 帮助过: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";
}

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/328004.htmlTechArticle 代码如下:

if ($_SERVER['HTTPS'] != "on") { echo "This is not HTTPS"; }else{ echo "This is HTTPS"; }if ($_SERVER['HTTPS'] != "on") { echo "This is not HTTPS"; }else...

人气教程排行