前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SMARTY核心

SMARTY核心

作者头像
Java架构师必看
发布2021-03-22 11:09:54
2.5K0
发布2021-03-22 11:09:54
举报
文章被收录于专栏:Java架构师必看

http://www.smarty.net/http://smarty.php.net/manualPHP

obj_smarty->cache_lifetime = 60 * 60 * 24;//-1:缓存从不过期,0:每次执行缓存总是被重新建立          }  2.循环,section,sectionelse         <!!sectionelse!!> 用来表示传入的数组变量为空时对模板进行的处理。         <!!section name=on e loop=smarty.section.on e.total!!>     //display the number of iterations that this section will loop                  <!!arr_result!!>             <input type="checkbox" name="<!!arr_result[on e].value|inarray:arr_values) !!>checked<!!/if!!>/><!!arr_result!!>             <option value="<!!selectedvalue !!>selected<!!/if!!>><!!sam.adurl!!>">           <img src="upload/images/<!!sam.adurl!!>" title="<!!sam.adtitle|substrgb:'0':'20':''!!></a>          <!!/table_foreach!!>  4.包含文件,include              <!!include file="header.tpl"!!> 5.不解析,literal              <!!literal!!> 这里是js或css,模板不解析 <!!/literal!!> 6.条件判断,if,elseif,else              <!!if articleTitle|substrgb:"0":"23":".."!!>                 <!!contact!!>                          <!!cust_ids selected=customer_id options=cust_options output=cust_names!!>                         </select> 14:换行替换,nl2br             换行符替换成<br />                 <!!articleTitle|strtolower!!> 19:获取字符串,fetch         获取字符串                 int_cache_id = sprintf('%X', crc32("index.html"));                 if( !obj_smarty->assign("str_date",date("h:i:s"));                 }                 arrParams ) {                     return arrParams["lid"]."-andy-".

本文由来源 21aspnet,由 javajgs_com 整理编辑,其版权均为 21aspnet 所有,文章内容系作者个人观点,不代表 Java架构师必看 对观点赞同或支持。如需转载,请注明文章来源。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档