Home  >  Article  >  Backend Development  >  How to use php to determine whether the server is an HTTPS connection_PHP tutorial

How to use php to determine whether the server is an HTTPS connection_PHP tutorial

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

复制代码 代码如下:

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...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn