smarty函数
来源:互联网 发布:黑客特效js 编辑:程序博客网 时间:2024/05/16 19:17
smarty函数:
内建函数:smarty自带,不能修改
自定义函数:可以自行修改
保存在libs/plugins目录下
语法格式类似于html标记的写法<{..........}>
smarty自定义函数:
例如:assign
作用:用于在模板被执行时为模板变量赋值
参数:var:声明变量名称 字符串
value:给变量赋值 字符串
<{assign var="title" value="this is title"}>
$tpl->assign("title",this is title);
1)实现自定义函数
a.html
<{title num="10" content="aaaaaaaaaaaa" size="10" color="red"}>
b.php
第一步:自定义函数
function fun1(){}
第二步:注册自定义函数
$tpl->register_function("模板文件中的函数名","php中函数名")
2)注册块
$tpl->register_block("模板文件中的块名","php中的函数名")
- 【smarty】smarty自定义函数
- smarty函数
- smarty函数
- smarty函数
- smarty函数
- 分页函数(Smarty + Adodb)
- smarty常规函数
- smarty中的register_modifie函数
- smarty内置函数
- Smarty常用函数
- Smarty常用函数
- smarty内建函数
- Smarty 函数注册
- 了解smarty自定义函数
- smarty自定义函数
- smarty自定义函数总结
- smarty自定义函数
- smarty自定义函数
- JAVA排序汇总 .
- Android之Activity组件
- android 的skia 图形引擎库
- ACM学习计划
- Java反射笔记1
- smarty函数
- u-boot中typedef应用解析___init_fnc_t *init_sequence[]
- 很美的句子
- 《分页》分析及 源代码分析
- java.sql.SQLException: ORA-00911: invalid character
- MySQL变量使用及数据库存储过程实现分页
- smarty自定义函数
- zeroDateTimeBehavior=convertToNull
- 黑马程序员_代理