将你的织梦手机内容模板内容调用标签换成这个即可实现
{dede:field.body runphp=yes} global $cfg_basehost; $str = @me; $search = '/(<img.*?)width=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search1 = '/(<img.*?)height=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search2 = '#(<img.*?style=".*?)width:\s{0,}\d+px;([^"]*?.*?>)#i'; $search3 = '#(<img.*?style=".*?)height:\s{0,}\d+px;([^"]*?.*?>)#i'; $content = preg_replace($search,'$1$3',$str); $content = preg_replace($search1,'$1$3',$content); $content = preg_replace($search2,'$1$2',$content); $content = preg_replace($search3,'$1$2',$content); @me = str_replace('https://www.lol9.cn/uploads/allimg/', $cfg_basehost.'https://www.lol9.cn/uploads/allimg/', $content); @me = str_replace('/m/', '/', $content); {/dede:field.body}
织梦二次开发QQ群
本站客服QQ号:862782808(点击左边QQ号交流),群号(383578617) 如果您有任何织梦问题,请把问题发到群里,阁主将为您写解决教程!
转载请注明: 织梦模板 » 织梦手机端文章内容页内链去除m的方法
标签: