Discuz论坛本地附件与远程附件的转换方法,详细步骤如下:- _# V$ ]# D, r: N: i$ ~
& u% q- z6 J. b+ q, R+ c一、后台--全局--上传设置--远程附件--启用远程附件:是1 T6 G) |, Q2 x+ @2 d1 G
, d% w: l/ Z; g% Y' j
这里根据后台提示和自己开启的远程服务器的FTP的信息配置就可以,要确保FTP具有以下权限:读取文件、写入文件、删除文件、创建目录、子目录继承。
+ H# l6 j+ ]/ F! e, T' Q+ v二、上传data/attachment下面的文件夹到远程空间的根目录下. q3 n7 U0 e$ e
* Z& T/ `( n6 p1 z6 c6 @9 W( E
三。转换数据库的本地附件的数据为远程附件数据
8 D3 `7 d/ c1 {. s4 _, b7 k涉及到的数据库表:
L# @% h; }4 p7 R) q' kpre_forum_attachment2 s) ]8 a' K7 v3 e3 n p
pre_home_pic* `; m3 i( i3 k+ o+ H+ _/ }1 d$ r
pre_portal_article_title
7 m# R+ M) A% U. K- ?: dpre_portal_attachment
% |9 }0 D' f: m& v' @$ b1 {pre_portal_topic_pic
* E' D8 J4 o |1 e在后台--站长--数据库--升级--分别执行如下代码3 h9 K3 _8 U$ Y2 I( r
1、pre_forum_attachment( P* o2 T9 S# W2 g3 ?7 G6 ]
- update pre_forum_attachment_0 set remote = '1';
3 @* X$ g4 s. x# K - update pre_forum_attachment_1 set remote = '1';2 }6 U5 ?% t \
- update pre_forum_attachment_2 set remote = '1';
5 Q$ i2 A# K2 \7 ]& [ - update pre_forum_attachment_3 set remote = '1';
6 Y( x+ Z0 H' T% |: E- H - update pre_forum_attachment_4 set remote = '1';( G+ M+ n. h( }8 ?3 t8 @" o) M; P
- update pre_forum_attachment_5 set remote = '1';. k* a5 ? a5 C! k
- update pre_forum_attachment_6 set remote = '1';
( z, M r0 K, o9 ~# B - update pre_forum_attachment_7 set remote = '1';
: R$ m) ?, U1 Z - update pre_forum_attachment_8 set remote = '1';- s& g; K0 T" ^) [4 Q
- update pre_forum_attachment_9 set remote = '1';
复制代码 2、pre_portal_article_title,pre_portal_attachment,pre_portal_topic_pic
3 z# b" K# l% o Z$ C- update pre_portal_article_title set remote=1;
9 g1 @8 m F% ] - update pre_portal_attachment set remote=1;7 @6 D# N+ e5 w+ U4 Y
- update pre_portal_topic_pic set remote=1;
复制代码 3、由于相册表中的remote取值还有一种情况为remote=2(论坛附件图片保存到相册)pre_home_pic,执行语句:! W, z- u' P, T- J3 C$ [0 s6 N, J
- update pre_home_pic set remote=remote+1;
复制代码 稳定互联提示:按照以上操作后,打开网站附件 - 属性看看是否已经在远程地址上了,如果显示正常说明就已经把Discuz本地附件成功转换为远程附件了。) Y9 E+ @0 t0 ]
|