经测试代码如下:
<?PHP
/**
* 判断服务器是否https连接
*
* @param
* @arrange (512.笔记) jb51.cc
**/
if ($_SERVER['HTTPS'] != "on") {
echo "This is not HTTPS";
}else{
echo "This is HTTPS";
}
/*** 来自:编程之家 jb51.cc(jb51.cc) ***/
?>
原文链接:https://www.f2er.com/php/528760.html