think 显示

12 test12 12 1351175337
//时间戳 转日期格式
<span style="color:gray">[ {$vo.create_time|date='Y-m-d H:i:s',###} ]</span> {$vo.title}

[ 2012-10-25 22:28:57 ] test12
$("#getcode_zh").click(function(){
        $(this).attr("src",'code_zh.php?' + Math.random());
    });

 中文字符串截取

//msubstr($str, $start=0, $length, $charset=”utf-8″, $suffix=true)
//$str:要截取的字符串
// $start=0:开始位置,默认从0开始
// $length:截取长度
// $charset=”utf-8″:字符编码,默认UTF-8
// $suffix=true:是否在截取后的字符后面显示省略号,默认true显示,false为不显示
//模版使用:{$vo.title|msubstr=0,5,'utf-8',false}

{$data.title|mb_substr=###,0,36,'utf-8',true}
原文地址:https://www.cnblogs.com/suxiaolong/p/5707694.html