找回密码
 立即注册
查看: 1513|回复: 0

Discuz x2.5 本地附件与远程附件的转换

[复制链接]
等级头衔

等級:网站编辑

积分成就
威望
0
贡献
0
主题
260
精华
0
金钱
736
积分
1037
注册时间
2012-10-30
最后登录
2022-1-27

爱我家 发表于 2012-11-16 22:43:13 | 显示全部楼层 |阅读模式
Discuz x2.5 本地附件与远程附件的转换
本地附件转换远程附件是很多网站发展过程的一个需要,那么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 本地附件成功转换为远程附件了。

◇爱我家◇-->awoj.cn
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

下载手机安卓版|手机版|劉家. ( 京ICP备05079106号 )

GMT+8, 2024-5-17 12:08 , Processed in 0.225482 second(s), 27 queries . Template by CnRen.Vip

版权: 劉家(CnLiuJia) 信息:来源于网络

Copyright © 2000-2024 CnLiuJia.Com Inc.All Rights Reserved

快速回复 返回顶部 返回列表