复制代码 代码如下: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使用curl访问https示例分享php之curl实现http与https请求的方法php抓取https的内容的代码php curl 获取https请求的2