Heim  >  Artikel  >  Backend-Entwicklung  >  如何使用php判断服务器是否是HTTPS连接_PHP教程

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

WBOY
WBOYOriginal
2016-07-21 15:01:15794Durchsuche

复制代码 代码如下:

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...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn