Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用下面的代码检测 https,但全局变量 $_SERVER['https'] 的值始终未定义。
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'|| $_SERVER['SERVER_PORT'] == 443) ? true : false ;
这部分代码位于 opencart 的头部。SSL 证书已安装并且安全连接正常工作......有什么想法吗?
在这台服务器上 $_SERVER['https'] 被称为 $_SERVER['http-https']... 这是唯一的错误。