discuz本地附件完全远程化

本地附件转换远程附件是很多网站发展过程的一个需要,那么Discuz x2.5 本地附件与远程附件的如何转换呢?下面站帮网-ARCHY分享下操作Discuz x2.5 本地附件还债远程附件方法。

一、后台–全局–上传设置–远程附件–启用远程附件:是

这里根据后台提示和自己开启的远程服务器的FTP的信息配置就可以,要确保FTP具有以下权限:读取文件、写入文件、删除文件、创建目录、子目录继承。

二、上传data/attachment下面的文件夹到远程空间的atta目录下

三。转换数据库的本地附件的数据为远程附件数据

涉及到的数据库表:
pre_forum_attachment
pre_home_pic
pre_portal_article_title
pre_portal_attachment
pre_portal_topic_pic

在后台–站长–数据库–升级–分别执行如下代码

1、pre_forum_attachment
update pre_forum_attachment_0 set remote = ‘1’;
update pre_forum_attachment_1 set remote = ‘1’;
update pre_forum_attachment_2 set remote = ‘1’;
update pre_forum_attachment_3 set remote = ‘1’;
update pre_forum_attachment_4 set remote = ‘1’;
update pre_forum_attachment_5 set remote = ‘1’;
update pre_forum_attachment_6 set remote = ‘1’;
update pre_forum_attachment_7 set remote = ‘1’;
update pre_forum_attachment_8 set remote = ‘1’;
update pre_forum_attachment_9 set remote = ‘1’;

2、pre_portal_article_title,pre_portal_attachment,pre_portal_topic_pic

update pre_portal_article_title set remote=1;
update pre_portal_attachment set remote=1;
update pre_portal_topic_pic set remote=1;

3、由于相册表中的remote取值还有一种情况为remote=2(论坛附件图片保存到相册)pre_home_pic,执行语句:

update pre_home_pic set remote=remote+1;

按照以上操作后,打开网站附件–属性看看是否已经在远程地址上了,如果显示正常说明就已经把Discuz x2.5 本地附件成功转换为远程附件了。

打赏
Bookmark the permalink.
0 0 投票数
文章评分
订阅评论
提醒
guest

1 评论
内联反馈
查看所有评论