帝国ECMS内容简介在内容模板中调用smalltext过滤简介中的空格、换行符等

迅恒数据中心
帝国ECMS内容简介在内容模板中调用smalltext过滤简介中的空格、换行符等,全网唯一能用的代码:
<?
$smalltext=str_replace('
','',$navinfor[smalltext]);
$smalltext=str_replace(' ', '', $smalltext);
$smalltext=str_replace(' ', '', $smalltext);
$smalltext=str_replace('    ', '', $smalltext);
$smalltext=str_replace('&quot;', '', $smalltext);
$smalltext=str_replace('&lt;', '', $smalltext);
$smalltext=str_replace('&gt;', '', $smalltext);
$smalltext=str_replace('&amp;#39;', '', $smalltext);
$smalltext=str_replace('&#39;', '', $smalltext);
$smalltext=str_replace('&amp;', '', $smalltext);
$smalltext=str_replace('&nbsp;', '', $smalltext);
$smalltext=str_replace('&ldquo;', '', $smalltext);
$smalltext=str_replace('&rdquo;', '', $smalltext);
$smalltext=str_replace('middot;', '', $smalltext);
$smalltext=str_replace('&mdash;', '', $smalltext);
echo $smalltext;
?>
在内容页需要调用内容简介的地方直接加上上面的代码即可

并在字段管理中  将   回车替换成换行符  支持html代码  选上

分类:教程帮助 百度收录 必应收录