|  
 TA的每日心情|  | 奋斗 2019-10-18 11:20
 | 
|---|
 签到天数: 678 天 [LV.9]以坛为家II | 
| 以下是个人亲测的,没问题,通信成功 
 DISCUZ 开启https后ucenter通信失败解决方法,一般是做完301重定向https后通信失败的,下面是具体解决方法:
 
 打开目录 uc_server/model/misc.php 文件;
 
 找到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);
                }
 | 
 |