设为首页
收藏本站
开启辅助访问
切换到宽版
登录
立即注册
快捷导航
发布信息
搜索
搜索
网站首页
自丢网
社区论坛
自丢网论坛
附件中心
源码下载
邀请码
丢币充值
本版
帖子
自丢网
»
社区论坛
›
建站程序/IT教程
›
Discuz教程
›
Discuz!X版本地附件与远程附件的转换方法教程 ...
返回列表
发新帖
Discuz!X版本地附件与远程附件的转换方法教程
[复制链接]
2187
|
0
|
2020-2-18 10:20
|
显示全部楼层
|
阅读模式
discuz论坛程序进行
本地附件与远程附件的转换
操作前,请备份数据库
一本地转到远程
1论坛后台--全局--上传设置--启用远程附件
2将本地附件目录data/attachment里面的文件夹移动到远程服务器上
3数据库执行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;
复制代码
discuz教程
,
dz教程
相关帖子
•
discuz!x模板里遍历数组 打印数组方法
•
Discuz手机版获取论坛里回复帖子内容代码教程
•
基于 Docker 容器安装Discuz Q
•
discuz重置密码MD5
•
突破discuz!x默认附件大小数据库表int修改教程
•
dz系统提醒信息删除方法教程
•
discuz!x系列门户文章功能增加关键词自定义keywords字段
•
dzx!3.4/3.5复制链接实现伪静态操作discuz教程
•
discuz!x3.4/3.2修改手机端触屏版本主题上传附件自动被压缩图片大小的问题
•
discuz版本号输出代码
•
Discuz!X数据库操作方法教程
•
DZ分类信息一键导入-交友、租房、房产、等等
•
Discuz! System Error Undefined constant "title"报错处理
回复
举报
返回列表
发新帖
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
立即注册
本版积分规则
发表回复
回帖后跳转到最后一页
admin
UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-30
加好友
发消息
回复楼主
返回列表
源码下载
Thinkphp教程
修罗xiuno教程
Discuz教程
zzz资源/教程
织梦教程
服务器教程
数据库教程
Html/Html5教程
JavaScript教程
Css/Css3教程
建站/web前端教程
PHP教程
其他编程教程
小程序app教程
PPT模板/素材
Word简历模板/素材
Excel模板/素材
素材中心
百科知识
图文推荐
html+js实现本站已运行运营多少天代码
2024-2-8 09:19
2024年最新ThinkPHP8.x 讲义代码SQL,实战部分结合四种前端教程
2024-1-23 09:25
小学生必背古诗75首-标注-翻译-A4可打印word版本下载
2024-1-23 09:18
长截图 截动图gif制作 贴图软件免费下载
2024-1-22 10:45
D盾_防火墙 版本: v2.1.8.1最新绿色免安装版本扫木马病毒
2024-1-22 08:27
热门排行
1
修罗轻论坛程序Xiuno免费开源+收费插件模板风格大全 价值1200元 百度云网盘下载
2
仿看雪论坛模板风格 for 修罗模板 支持4.0以上版本
3
【专业商业版】积分插件 v1.25 for xiuno修罗插件
4
修罗程序添加水印插件 for xiuno插件 支持4.0以上版本
5
邀请注册、用户消费购买邀请码 for 修罗插件 支持xiuno4.0以上版本
6
分类/标签(TAG) - 增强版 v2.5 for xiuno插件 支持4.0以上版本
7
tStore积分商城插件 v1.03 for 修罗插件 xiuno4.0以上版本
8
UMEditor 百度编辑器 v2.6 for 修罗插件xiuno 支持4.0以上版本