详情页

帝国CMS 同步删除移动端信息文件功能

时间:2023年06月10日

编辑:佚名

",$newstext);
    for($i=1;$i<=count($r);$i++)
    {
        if(strstr($filename,'/'))
        {
            DelPath(eReturnTrueEcmsPath().$iclasspath.$mynewspath.ReturnInfoSPath($filename));
            DelPath($mob_r['msitepath'].$iclasspath.$mynewspath.ReturnInfoSPath($filename));
        }
        else
        {
            if($i==1)
            {
                $file=eReturnTrueEcmsPath().$iclasspath.$mynewspath.$filename.$filetype;
                $mfile=$mob_r['msitepath'].$iclasspath.$mynewspath.$filename.$filetype;
            }
            else
            {
                $file=eReturnTrueEcmsPath().$iclasspath.$mynewspath.$filename."_".$i.$filetype;
                $mfile=$mob_r['msitepath'].$iclasspath.$mynewspath.$filename."_".$i.$filetype;
            }
            DelFiletext($file);
            DelFiletext($mfile);
        }
    }
}
说明:
(1)以上蓝色部分代码是新增的,你也可以仅增加蓝色部分代码。
(2)对于没有使用过78模板网移动端同步生成插件的帝国程序也可以使用,需要将上述代码中的 $mob_r['msitepath'] 修改成自己的移动端绝对地址。
相关文章
猜你需要