DZ开启强制https后ucenter通信失败解决方法DZ开启强制https后ucenter通信失败解决方法

DZ开启强制https后ucenter通信失败,一般是因为http协议301重定向至https协议后通信失败的,uc_server/control/admin

打开目录 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);
}

此文来自葱子博客
作者未经测试是否有效

未经允许不得转载:Sheepbar » DZ开启强制https后ucenter通信失败解决方法

赞 (24) 打赏

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

微信扫一扫打赏