经测试代码如下:
/**
* 检查服务器是否使用HTTPS
*
* @param
* @author 编程之家 jb51.cc jb51.cc
**/
if ($_SERVER['HTTPS'] != "on") {
echo "This is not HTTPS";
}else{
echo "This is HTTPS";
}
/**
* 检查服务器是否使用HTTPS
*
* @param
* @author 编程之家 jb51.cc jb51.cc
**/
if ($_SERVER['HTTPS'] != "on") {
echo "This is not HTTPS";
}else{
echo "This is HTTPS";
}