discuz附件转换为远程与本地代码教程

编辑dz程序中,/config/config_global.php

搜索文件名中代码

$_config[‘admincp’][‘runquery’] = ‘0’;

将代码中0改为1,如下

$_config[‘admincp’][‘runquery’] = ‘1;

进入dz管理后台,站长>数据库>升级

将代码复制到-Discuz! 数据库升级框中

 

以下执行代码为论坛附件转移到远程

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_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;
最后确保dz程序下attachment目录转移到远程服务器或转回本地服务器中。
后台工具缓存即可

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注