去评论
dz插件网

DZAPP使用远程附件功能后,在本地的图片无法显示

admin
2020/07/08 10:03:14


DZAPP的插件没有判断图片是本地还是远程,只要论坛启用了远程附件功能,就一律把图片链接指向远程,导致在本地的图片无法显示
解决办法,打开:source/plugin/dzapp_base/function/function_base.php
找到
  1. return ($_G['setting']['ftp']['on'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).$type.$url;
修改为
  1. if(!$_G['setting']['ftp']['on'] || file_exists(DISCUZ_ROOT.$_G['setting']['attachdir'].$type.$url)){        return $_G['setting']['attachurl'].$type.$url;}else{        return $_G['setting']['ftp']['attachurl'].$type.$url;}

需要改各个DZAPP插件的DIY文件