时时商务社区

标题: 如何使用php判断服务器是否是HTTPS连接 [打印本页]

作者: wx_pylelnL4    时间: 2018-2-14 08:15

            [U]复制代码[/U] 代码如下:
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";
}
            
            
您可能感兴趣的文章:
  • php抓取https的内容的代码
  • php使用curl访问https示例分享
  • php之curl实现http与https请求的方法
  • PHP实现抓取HTTPS内容
  • php中http与https跨域共享session的解决方法
  • php使用curl获取https请求的方法
  • php curl 获取https请求的2种方法
  • php使用curl打开https网站的方法
  • PHP中file_get_contents函数抓取https地址出错的解决方法(两种方法)
  • PHP抓取HTTPS内容和错误处理的方法
            




    欢迎光临 时时商务社区 (http://bbs.4435.cn/) Powered by Discuz! X3.2