if ($_SERVER['HTTPS'] != "on") { echo "This is not HTTPS";}else{ echo "This is HTTPS";}//该片段来自于http://www.codesnippet.cn/detail/150520133374.html
来源: http://www.codesnippet.cn/detail/150520133374.html