这个办法是我转载的
DISCUZ x3.2 开启https后ucenter通信失败解决方法(301重定向https后通信失败 按此办法处理)
uc目录model/misc.php
搜索- $port = !empty($matches['port']) ? $matches['port'] : 80;
复制代码
68行处 后面加入以下代码
- if(substr($url,0,5)=='https'){
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- if($post){
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- if($cookie){
- curl_setopt($ch, CURLOPT_COOKIE, $cookie);
- }
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- return curl_exec($ch);
- }
复制代码
|