时间:2021-07-01 10:21:17 帮助过:8人阅读
代码如下:
world!”); ?> 
代码如下:
$smarty = new Smarty; 
$smarty->assign(‘articleTitle', “Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.”); 
$smarty->display(‘index.tpl'); 
代码如下:
{$articleTitle} 
{$articleTitle|strip_tags} 
代码如下:
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years. 
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years. 
代码如下:
{$article.content|truncate:35:”…”:true} 
以上就介绍了 smarty中先strip_tags过滤html标签后truncate截取文章运用,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。