discuz开启https后 uc通信失败 的解决措施
发布时间:2021-11-30 17:43:58 所属栏目:PHP教程 来源:互联网
导读:DISCUZ x3.2 开启https后ucenter通信失败解决方法(301重定向https后通信失败 按此办法处理) uc目录model/misc.php 搜索 $port = !empty($matches[port]) ? $matches[port] : 80; 68行处 后面加入以下代码 01 if(substr($url,0,5)==https){ 02 $ch = curl_i
DISCUZ x3.2 开启https后ucenter通信失败解决方法(301重定向https后通信失败 按此办法处理) uc目录model/misc.php 搜索 $port = !empty($matches['port']) ? $matches['port'] : 80; 68行处 后面加入以下代码 01 if(substr($url,0,5)=='https'){ 02 $ch = curl_init($url); 03 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 04 if($post){ 05 curl_setopt($ch, CURLOPT_POST, 1); 06 curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 07 } 08 if($cookie){ 09 curl_setopt($ch, CURLOPT_COOKIE, $cookie); 10 } 11 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 12 return curl_exec($ch); 13 } (编辑:云计算网_泰州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |