dedecms栏目内容自动标签的方法
类别:建站知识   时间:10-07

文章介绍

处理写法如下:

{dede:field.content runphp="yes"}                      $str = preg_replace("/^\s+/", "", html2text(@me));                      if( !empty($str)  ){                          @me = '<div class="content">'.@me.'</div>';                      }else{                          @me = '';                         }  

由于栏目内容默认有标签或者空格吧,所以要先处理。

智慧半岛,是一家专注于青岛网站建设青岛网站开发的青岛网络公司,Copyright ©2007-2019 Ebandao.Cn 版权所有 All Rights Reserved.(建议在1366x768以上的浏览器中访问)鲁ICP备08014496号

13153297890