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

前端之家收集整理的这篇文章主要介绍了如何使用php判断服务器是否是HTTPS连接前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="codetitle"><a style="CURSOR: pointer" data="17576" class="copybut" id="copybut17576" onclick="doCopy('code17576')"> 代码如下:

<div class="codebody" id="code17576">
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";
}

原文链接:https://www.f2er.com/php/25858.html

猜你在找的PHP相关文章