首頁  >  文章  >  後端開發  >  如何使用php判断服务器是否是HTTPS连接_PHP教程

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

WBOY
WBOY原創
2016-07-21 15:01:15833瀏覽

复制代码 代码如下:

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...
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn