违法网站请勿向我司工作人员发起任何形式的人工服务请求,严禁利用鸿茂传媒技术支持服务与产品从事任何非法活动,如有发现不再提供任何技术支持。 ×

Discuz! X版本地附件与远程附件的转换教程

'Discuz!

进行操作前,请备份数据库

1、本地转到远程

论坛后台--全局--上传设置--启用远程附件

将本地附件目录data/attachment里面的文件夹移动到远程服务器上

数据库执行sql语句

论坛的(0表示本地,1表示远程

update pre_forum_attachment_0 set remote=1 where remote=0;

update pre_forum_attachment_1 set remote=1 where remote=0;

update pre_forum_attachment_2 set remote=1 where remote=0;

update pre_forum_attachment_3 set remote=1 where remote=0;

update pre_forum_attachment_4 set remote=1 where remote=0;

update pre_forum_attachment_5 set remote=1 where remote=0;

update pre_forum_attachment_6 set remote=1 where remote=0;

update pre_forum_attachment_7 set remote=1 where remote=0;

update pre_forum_attachment_8 set remote=1 where remote=0;

update pre_forum_attachment_9 set remote=1 where remote=0;

门户的

update pre_portal_article_title set remote=1 where remote=0;

update pre_portal_attachment set remote=1 where remote=0;

update pre_portal_topic_pic set remote=1 where remote=0;

相册的{相册表中的remote取值还有一种情况为remote=2(论坛附件图片保存到相册)}

update pre_home_pic set remote=remote+1;

二、远程转到本地

后台关闭远程附件设置,将附件移动到本地服务器的 data/attachment目录后执行sql即可

0表示本地,1表示远程

论坛

update pre_forum_attachment_0 set remote=0 where remote=1;

update pre_forum_attachment_1 set remote=0 where remote=1;

update pre_forum_attachment_2 set remote=0 where remote=1;

update pre_forum_attachment_3 set remote=0 where remote=1;

update pre_forum_attachment_4 set remote=0 where remote=1;

update pre_forum_attachment_5 set remote=0 where remote=1;

update pre_forum_attachment_6 set remote=0 where remote=1;

update pre_forum_attachment_7 set remote=0 where remote=1;

update pre_forum_attachment_8 set remote=0 where remote=1;

update pre_forum_attachment_9 set remote=0 where remote=1;

门户

update pre_portal_article_title set remote=0 where remote=1;

update pre_portal_attachment set remote=0 where remote=1;

update pre_portal_topic_pic set remote=0 where remote=1;

update pre_home_pic set remote=remote-1

© 网站版权与免责声明

1、【鸿茂传媒】独立拥有本网站相关网页内所有资料的版权;

2、未经【鸿茂传媒】的明确书面许可,任何人不得对其进行复制;

3、本网站未注明【鸿茂传媒】的文章,均来源于网络,仅供大家学习与参考;

4、如有侵权/违规/不妥请联系客服QQ或邮箱删除,敬请谅解;

5、【鸿茂传媒】保留随时更正、修改、更新本声明的权利。法律申明

服务需求留言板
*紧急问题联系客服
提交
提交需求
工作日: 8:30 - 22:00  在线客服咨询

扫码咨询微信客服

鸿茂传媒企业介绍
顶部