PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
/**
* 判断是否SSL协议
* @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协议(https)