帝国CMS列表页显示新闻、软件简介时自动清除换行符列表内容模板(list.var) (*) 使用程序代码:
if(strpos($r[smalltext],"n")>-1)2.{3.echo"<fontstyle="display:none">nl2br($r[smalltext])</font>";display:none隐藏必须用,不然出错4.}5.else6.{7.echo"<fontstyle="display:none">$r[smalltext]</font>";display:none隐藏必须用,不然出错8.}9.$str=$r[smalltext];10.$listtemp='<div>'.$str.'</div>';判断smalltext字段中是否含有换行符,含有去掉不含有直接输出.
帝国CMS判断男女显示不同内容代码:
<?php2.if($navinfor[sex]==1)3.{4.echo"男";5.}6.else7.{8.echo"女";9.}10.?>
上一篇:帝国cms模板中载入html页面调用方法和代码是什么?
下一篇:帝国cms删除字段报错 Cant DROP zzzy; check that column/key exists 。。。
自动清除换行符









