Smarty常用方法
来源:互联网 发布:zabbix agent windows 编辑:程序博客网 时间:2024/05/01 23:41
日期格式转换
[PHP]方法:date('Y-m-d', $v['time']);
[SMARTY]方法:{$data.value|date_format:"%Y-%m-%d %H:%M:%S"}
截取字符串:{ $data.value|truncate:28:'...'}
28个字节14个字数出,多余部分输出…
去除Html标签
[PHP]方法:htmlspecialchars($msg)
[SMARTY]方法:{$msg|strip_tags}
explode函数
{assign var=foo value=", "|explode:$var_to_explode}
换行符替换成[PHP]方法:nl2br($msg);
[SMARTY]方法:{$msg|nl2br}
- Smarty常用方法
- Smarty常用方法
- smarty常用方法
- Smarty常用方法
- smarty常用
- Smarty常用函数
- Smarty常用函数
- smarty 常用使用方法总结
- smarty常用整理
- Smarty常用函数
- Smarty常用函数
- smarty 常用使用方法总结
- Smarty的常用东东
- Smarty常用函数
- smarty常用标签
- Smarty常用函数
- smarty 的方法
- Smarty安装配置方法
- 五种常见的 PHP 设计模式
- 架构师核心技能养成计划
- 总结MYSQL的优化
- 10个让自己笑的理由
- 删除目录
- Smarty常用方法
- SMARTY缓存控制
- 成功十大原则
- SVG入门
- PHP4即将退出历史舞台
- G技术
- 一个参数的位置错误,浪费了我一个下午的时间
- PEAR的发展
- Tapestry Ajax Demo