/**
* 判断是否SSL协议。此代码来自ThinkPHP框架的公共函数文件(ThinkPHP/Common/functions.php)。
* @return boolean
*/
function is_ssl() {
if(isset($_SERVER['HTTPS']) && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))){
return true;
}elseif(isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'] )) {
return true;
}
return false;
}
php判断是否SSL协议
最新推荐文章于 2024-07-17 21:30:36 发布