久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區(qū)

標(biāo)題: Discuz ! X3.4,老舊帖子本地轉(zhuǎn)到遠(yuǎn)程與遠(yuǎn)程轉(zhuǎn)到本地的方法! [打印本頁]

作者: allthebest    時(shí)間: 2021-4-23 03:12
標(biāo)題: Discuz ! X3.4,老舊帖子本地轉(zhuǎn)到遠(yuǎn)程與遠(yuǎn)程轉(zhuǎn)到本地的方法!
本帖最后由 allthebest 于 2021-4-23 13:17 編輯

首先,要設(shè)置本地轉(zhuǎn)到遠(yuǎn)程,當(dāng)然先要啟用遠(yuǎn)程附件,并測試成功,否則不要使用老舊帖子本地轉(zhuǎn)到遠(yuǎn)程方法。要設(shè)置遠(yuǎn)程轉(zhuǎn)到本地方法,當(dāng)然也先要關(guān)閉遠(yuǎn)程附件功能。

一、本地轉(zhuǎn)到遠(yuǎn)程

1、論壇后臺–全局–上傳設(shè)置–啟用遠(yuǎn)程附件

2、將本地附件目錄data/attachment里面的文件夾移動到遠(yuǎn)程服務(wù)器上

3、數(shù)據(jù)庫執(zhí)行sql語句

論壇的

(where remote=0表示本地,where remote=1表示遠(yuǎn)程, pre_表示數(shù)據(jù)庫表前綴)

  1. update pre_forum_attachment_0 set remote=1 where remote=0;

  2. update pre_forum_attachment_1 set remote=1 where remote=0;

  3. update pre_forum_attachment_2 set remote=1 where remote=0;

  4. update pre_forum_attachment_3 set remote=1 where remote=0;

  5. update pre_forum_attachment_4 set remote=1 where remote=0;

  6. update pre_forum_attachment_5 set remote=1 where remote=0;

  7. update pre_forum_attachment_6 set remote=1 where remote=0;

  8. update pre_forum_attachment_7 set remote=1 where remote=0;

  9. update pre_forum_attachment_8 set remote=1 where remote=0;

  10. update pre_forum_attachment_9 set remote=1 where remote=0;
復(fù)制代碼


門戶的

  1. update pre_portal_article_title set remote=1 where remote=0;

  2. update pre_portal_attachment set remote=1 where remote=0;

  3. update pre_portal_topic_pic set remote=1 where remote=0;
復(fù)制代碼


相冊的

{相冊表中的remote取值還有一種情況為remote=2(論壇附件圖片保存到相冊)}

  1. update pre_home_pic set remote=remote+1;
復(fù)制代碼


二、遠(yuǎn)程轉(zhuǎn)到本地

后臺關(guān)閉遠(yuǎn)程附件設(shè)置,將附件移動到本地服務(wù)器的 data/attachment目錄后執(zhí)行sql即可

(where remote=0表示本地,where remote=1表示遠(yuǎn)程, pre_表示數(shù)據(jù)庫表前綴)(已包括論壇、門戶與相冊)

  1. update pre_forum_attachment_0 set remote=0 where remote=1;

  2. update pre_forum_attachment_1 set remote=0 where remote=1;

  3. update pre_forum_attachment_2 set remote=0 where remote=1;

  4. update pre_forum_attachment_3 set remote=0 where remote=1;

  5. update pre_forum_attachment_4 set remote=0 where remote=1;

  6. update pre_forum_attachment_5 set remote=0 where remote=1;

  7. update pre_forum_attachment_6 set remote=0 where remote=1;

  8. update pre_forum_attachment_7 set remote=0 where remote=1;

  9. update pre_forum_attachment_8 set remote=0 where remote=1;

  10. update pre_forum_attachment_9 set remote=0 where remote=1;

  11. update pre_portal_article_title set remote=0 where remote=1;

  12. update pre_portal_attachment set remote=0 where remote=1;

  13. update pre_portal_topic_pic set remote=0 where remote=1;

  14. update pre_home_pic set remote=remote-1;
復(fù)制代碼




作者: pcinstall    時(shí)間: 2021-5-6 22:29
看看......................
作者: wuyoua    時(shí)間: 2021-5-12 10:29
遠(yuǎn)程附件轉(zhuǎn)本地,但模板DIY圖片調(diào)用的還是遠(yuǎn)程的相對路徑,請問大佬怎麼解決?
作者: allthebest    時(shí)間: 2021-5-12 17:41
wuyoua 發(fā)表于 2021-5-12 01:29
遠(yuǎn)程附件轉(zhuǎn)本地,但模板DIY圖片調(diào)用的還是遠(yuǎn)程的相對路徑,請問大佬怎麼解決? ...

請嘗試按 https://gitee.com/Discuz/DiscuzX/pulls/912/files 修改后再試。

另外建議對本修改的測試在測試站點(diǎn)進(jìn)行,避免影響正常業(yè)務(wù)。
作者: fujie1982    時(shí)間: 2021-5-15 21:55
樓主,我想問個(gè)問題,3.4最快最穩(wěn)的環(huán)境是哪個(gè)?我現(xiàn)在是php7.1+mysql5.7  論壇開啟了opcache+redis  速度已經(jīng)比較滿意了。
那么,還可以更上php8.0+mysql8.0嗎?速度是否是會有更好的提升。是否支持和穩(wěn)定。
感謝

作者: allthebest    時(shí)間: 2021-5-15 22:44
fujie1982 發(fā)表于 2021-5-15 12:55
樓主,我想問個(gè)問題,3.4最快最穩(wěn)的環(huán)境是哪個(gè)?我現(xiàn)在是php7.1+mysql5.7  論壇開啟了opcache+redis  速度 ...

Discuz x 3.4不支持  PHP8.0




歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/) Powered by Discuz! W1.0