Discuz! 开启https后用户头像上传不了的解决方法,后台UC通讯是成功的。
在discuz目录里找到uc_client/client.php
1、转到第235行
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/'; 在下方添加以下代码(注意是添加不是修改!!是添加!添加!)
$matches['port'] = !empty($matches['port'])&&$scheme=='https' ? $matches['port'] : 443;
2、转到第261行
if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
修改为
if($port=='443'){ $temp = 'ssl://'; }else{ $temp = 'http://'; } if(!$fp = @fsocketopen($temp.($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
3、进入后台更新缓存,如果顺利的话问题已经解决!