帝国cms移动端插件不同步删除文件的解决方法

很多朋友在使用了这个插件之后发现删除文章之后不会同步删除手机端的文件,其实这个需要改一下php文件就可以了,今天带来帝国cms移动端插件不同步删除文件的解决方法

找到文件件e/class/functions.php,查找"function DelNewsFile",找到函数DelNewsFile,把开头和结尾中间部分替换成以下代码:
大概在1502 到1576左右

    1. function DelNewsFile($filename,$newspath,$classid,$newstext,$groupid=0){
    1. global $class_r,$addgethtmlpath,$mob_r;
    1. include_once ECMS_PATH."e/dongpo/mob/config.php";
    1. //文件类型
    1. if($groupid)
    1. {
    1. $filetype=".php";
    1. }
    1. else
    1. {
    1. $filetype=$class_r[$classid][filetype];
    1. }
    1. //是否有日期目录
    1. if(empty($newspath))
    1. {
    1. $mynewspath="";
    1. }
    1. else
    1. {
    1. $mynewspath=$newspath."/";
    1. }
    1. $iclasspath=ReturnSaveInfoPath($classid,$id);
    1. $r=explode("[!--empirenews.page--]",$newstext);
    1. for($i=1;$i<=count($r);$i++)
    1. {
    1. if(strstr($filename,'/'))
    1. {
    1. DelPath(eReturnTrueEcmsPath().$iclasspath.$mynewspath.ReturnInfoSPath($filename));
    1. DelPath($mob_r['msitepath'].$iclasspath.$mynewspath.ReturnInfoSPath($filename));
    1. }
    1. else
    1. {
    1. if($i==1)
    1. {
    1. $file=eReturnTrueEcmsPath().$iclasspath.$mynewspath.$filename.$filetype;
    1. $mfile=$mob_r['msitepath'].$iclasspath.$mynewspath.$filename.$filetype;
    1. }
    1. else
    1. {
    1. $file=eReturnTrueEcmsPath().$iclasspath.$mynewspath.$filename."_".$i.$filetype;
    1. $mfile=$mob_r['msitepath'].$iclasspath.$mynewspath.$filename."_".$i.$filetype;
    1. }
    1. DelFiletext($file);
    1. DelFiletext($mfile);
    1. }
    1. }
    }
资源下载此资源仅限注册用户下载,请先
欢迎加入官方1群:526682442
客服QQ:1561406017
本站源码都用D盾扫过没有后门木马的,但是安全起见大家下载之后可以自行再扫一遍
注意:价格只是提供资源下载,不包含任何服务。
本站程序前面写都会有标注,如果程序不会,可以开通vip或者付费解决。小白请勿下载
资源下载
下载价格免费
欢迎加入官方1群:526682442
客服QQ:1561406017
本站源码都用D盾扫过没有后门木马的,但是安全起见大家下载之后可以自行再扫一遍
注意:价格只是提供资源下载,不包含任何服务。
本站程序前面写都会有标注,如果程序不会,可以开通vip或者付费解决。小白请勿下载

原文链接:https://www.zylou.cn/9193.html,未经允许,禁止转载。

评论0

请先

站内大部分资源收集于网络,若侵犯了您的合法权益,请联系我们删除!欢迎投稿资源赚佣金
没有账号? 注册  忘记密码?