偶尔发现模块管理-模块列表中没有内容
看了下代码,结合网友的说法是/data/module/moduleurllist.txt的内容被清空了的原因
重建moduleurllist.txt就好了
实际上dede在读取列表的时候会到updatehost去读取这个文件的内容
所以可以
1、
wget http://updatenew.dedecms.com/base-v57/dedecms/module_$cfg_soft_lang/modulelist.txt ($cfg_soft_lang 是编码 如utf-8)
获取官方的moduleurllist.txt
2、
<?php
require_once("include/common.inc.php");
require_once(DEDEDATA."/admin/config_update.php");
require_once(DEDEINC.'/dedehttpdown.class.php');
require_once(DEDEINC.'/helpers/file.helper.php');
require_once(DEDEINC.'/dedemodule.class.php');
$url = $updateHost.'dedecms/module_'.$cfg_soft_lang.'/modulelist.txt';
$cachefile = DEDEDATA.'/module/moduleurllist.txt';
$dhd= new DedeHttpDown();
$dhd->OpenUrl($url);
$remotelist = $dhd->GetHtml();
PutFile($cachefile, $remotelist);
echo '完成';
?>
丢到网站根目录,访问之。
本文介绍了解决DedeCMS模块管理中模块列表缺失的问题方法。通过重新下载官方提供的moduleurllist.txt文件,确保模块列表正常显示。提供了两种手动更新文件的具体步骤。
9819

被折叠的 条评论
为什么被折叠?



