DISCUZ 开启https后ucenter通信失败解决方法,一般是做完301重定向https后通信失败的,下面是具体解决方法:
打开目录 uc_server/model/misc.php 文件;
找到69行(如下图),插入下面代码:
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);
}
![图片[1] | DISCUZ开启https后ucenter通信失败解决方法 | 零号床学习笔记](https://joowhee.com/wp-content/uploads/2017/02/discuz-https.png)
© 版权声明
分享是一种美德,转载请保留原链接
THE END






