php模板引擎smarty的变量操作符

php模板引擎smarty的变量操作符<br /> capitalize首字母大写<br /> count_characters计算字符数<br /> cat连接字符串<br /> count_paragraphs段落计算<br /> count_sentences计算句数<br /> count_words计算单词个数<br /> date_format时间格式<br /> default默认<br /> escape转码<br /> indent缩进<br /> lowver小写<br /> nl2br换行字符替换成&lt;br&gt;<br /> regex_replace正则替换<br /> replace替换<br /> specify插空<br /> string_format字符串格式化<br /> strip去除多余空格<br /> strip_tags去除html标签<br /> truncate截取<br /> upper大写<br /> wordwrap行宽约束<br /> 用法<br /> {$str|capitalize}<br /> 带参数用法<br /> {$str|escape:'url'}<br /> {$smarty.now|date_format:'%-%m-%d'}<br /> {$str|indent:10:&amp;nbsp}<br /> {$str | replace : is &quot;***&quot;}<br /> {$str | truncate : 30 : '.....'}<br />
RangeTime:0.005860s
RangeMem:204.58 KB
返回顶部 留言