书画家郑路迅的一些碎语记录

Discuz!X3.4本地附件全部修改为远程附件的方法

13 06月
作者:老路|分类:电脑网络技术|标签:网页设计 Discuz!

一、本地转到远程

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

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

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;

复制


二、远程转到本地

后台关闭远程附件设置,将附件移动到本地服务器的 data/attachment目录后执行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;

复制



浏览3899 评论26
返回
目录
返回
首页
郑路迅 2020年篆刻作品01 网站提示DedeCMS:CSRF Token Check Failed!解决

发表评论

  • 评论列表
  • 2K电影网 于 2025-10-16 01:00:22  回复
  • 楼上的能详细介绍一下么?https://www.2kdy.com
  • 2K电影 于 2025-10-17 19:30:48  回复
  • 顶顶更健康!https://www.2kdy.com
  • 2K影院 于 2025-10-18 05:03:32  回复
  • 楼主说的我也略懂!https://www.2kdy.com
  • 2K电影网 于 2025-10-23 01:39:13  回复
  • 看帖回帖一条路!https://www.2kdy.com
  • 2K电影网 于 2025-10-27 15:41:17  回复
  • 没人理我,好伤心啊!https://www.2kdy.com
  • 2K影视 于 2025-10-29 06:40:23  回复
  • 这位作者的文笔极其出色,用词精准、贴切,能够形象地传达出他的思想和情感。https://www.2kdy.com
  • 2K影院 于 2025-11-02 16:03:50  回复
  • 论坛的人气不行了!https://www.2kdy.com
  • 香蕉影视 于 2025-11-03 15:45:47  回复
  • 网站做得不错https://www.xjtv1.com
  • 2K电影 于 2025-11-04 11:29:16  回复
  • 顶顶更健康!https://www.2kdy.com
  • 2K电影 于 2025-11-05 09:06:53  回复
  • 很有品味!https://www.2kdy.com
  • 香蕉影院 于 2025-11-05 20:05:51  回复
  • 投楼主一票,不用谢哦!https://www.xjtv1.com
  • 香蕉影院 于 2025-11-06 02:05:25  回复
  • 文章写太挺好了,真的值得推荐https://www.xjtv1.com
  • 香蕉电影 于 2025-11-06 07:40:52  回复
  • 回帖也有有水平的!https://www.xjtv1.com
  • 2K影院 于 2025-11-10 02:46:37  回复
  • 楼上的别说的那么悲观好吧!https://www.2kdy.com
  • 2K影视 于 2025-11-13 17:29:16  回复
  • 读了楼主的帖子,顿时马桶就通了。。。https://www.2kdy.com
  • 2K影院 于 2025-11-15 11:23:05  回复
  • 我对楼主的敬仰犹如滔滔江水绵延不绝!https://www.2kdy.com
  • 2K电影网 于 2025-11-22 00:41:43  回复
  • 楼主很有经验啊!https://www.2kdy.com
  • 心理器材 于 2025-11-23 13:12:20  回复
  • 谢谢楼主的分享!https://aptlawfirm.com/
  • 365短剧网 于 2025-11-23 16:06:53  回复
  • 楼主的帖子越来越有深度了!https://www.365duanju.com
  • 2K电影 于 2025-11-25 04:55:19  回复
  • 关注一下!https://www.2kdy.com
  • 2K电影 于 2025-11-30 20:00:10  回复
  • 这么版块的帖子越来越有深度了!https://www.2kdy.com
  • 2K影院 于 2025-12-01 08:22:06  回复
  • 感谢楼主的推荐!https://www.2kdy.com
  • 2K影院 于 2025-12-02 19:21:57  回复
  • 楼上的心情不错啊!https://www.2kdy.com