最几天把网站全加上了SSL,当对附件远程时,如果是https://的缩略图显示不正常,看到代码是:src="https://www.phppc.comhttps://www.phppc.com/uploads/allimg/210116/1610767441403917.png"
正常情况应该是src="https://www.phppc.com/uploads/allimg/210116/1610767441403917.png"
前面的“https://www.dg165.com"是多出来的, 本来是dede:arclist 下的[field:picname/] 这个标签,我查了对应的数据库字段里面存放的内容,是正常的
数据库字段中的显示是正常的
于上去追查dede.arclist 对应的数据处理文件/include/taglib/arclist.lib.php
发现在507行 $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
凭感觉就是 $GLOBALS['cfg_mainsite'] 这个是多余的,当没有http时,就会自动加上http,在没有ssl证书的情况下,显示正常,如果是以https开头,就自动加上了 本网站的地址
于改改为:$row['litpic'] =$row['litpic']; 显示正常
同样,在列表页对应的/include/arc.listview.class.php 这个文件中
把$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; 也改为$row['litpic'] = $row['litpic'];
这样全站缩略图全部正常显示。