帝国CMS 上传附件保持原文件名
找到 /e/class/connect.php
查找 $r[filetype]=GetFiletype($file_name);
在下面加入
$filename2=str_replace($r[filetype], '', $file_name); //获得去掉后缀的文件名
$mytype = array (".cod", ".jad"); //定义需要保留原名的文件类型
查找 $r[filename]=$r[insertfile].$r[filetype];
修改为
if(in_array($r[filetype],$mytype)){
$r[filename]=$filename2.$r[filetype]; //真实文件名
}
else
{
$r[filename]=$r[insertfile].$r[filetype];
}
未经允许不得转载:Just My Socks中文教程网 » 帝国CMS教程:上传附件保持原文件名的修改操作
Just My Socks中文教程网
【教程】帝国cms生成文章报错502 Bad Gateway解决办法
帝国CMS使用教程:百度收录/e/extend/infocomment/commentajax.php?classid=xxxx&id=xxx


