📜  php 检查 url 是 http 还是 https - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:04.430000             🧑  作者: Mango

代码示例1
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
    $link = "https";
else
    $link = "http";