一、本地转到远程
1、论坛后台–全局–上传设置–启用远程附件
2、将本地附件目录upload里面的文件夹移动到远程服务器上
3、数据库执行sql语句
论坛的
(where remote=0表示本地,where remote=1表示远程, pre_表示数据库表前缀)
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;
二、远程转到本地
后台关闭远程附件设置,将附件移动到本地服务器的 upload目录后执行sql即可
(where remote=0表示本地,where remote=1表示远程, pre_表示数据库表前缀)(已包括论坛、门户与相册)
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;
历史资源提醒--必看
该页面资源/教程来自原魔趣吧历史资源转移,因发布历史久远,部分资源/教程可能已失效或无法在最新版程序中安装使用!DZ资源建议在Discuz3.4及以下版本使用,PHP版本建议5.6。资源仅提供做代码研究学习使用!
因改版,部分贴内链接将无法正常跳转,如链接失效或未正常跳转,请利用站内搜索功能搜索资源名称获取对应资源!