work_note 2016年2月18日, PM 12:21:29
来源:互联网 发布:canon mp236清零软件 编辑:程序博客网 时间:2024/06/16 16:36
smarty 技巧:
时间格式化:{|$v.add_time|date_format:"%Y-%m-%d %H:%M"|}
中文文字裁剪{|$declaration|truncate_cn:120:'...'|}
如果为空值,默认值 {|$v.commentNum|default:’0’|}
传递数组:1、在model中建立数组:``` public $_field = array( 'title'=>array( 1=>'教授', 2=>'博士', 3=>'先生', 4=>'女士', 5=>'小姐' ) ) ``` 2、在controller中 传到smarty:
$temp['field'] = M('mn_user')->_field;
3、在模版中使用: ``` <td>称呼</td> <td>{|$field['title'][$data['title']]|}</td> ```
- 工作记录
去掉文章 show_time ok
去掉 face ok
UE编辑器的 替换 全部更改为在后台替换$result['content'] = str_replace('\"', '"', $result['content']); ok
0 0
- work_note 2016年2月18日, PM 12:21:29
- Linux 学习笔记 2016年3月2日, PM 10:01:30
- 2016年2月22日--2月29日(18小时,剩3152小时)
- 此博客创建于2014年8月21日16:10pm
- 2016年2月29日工作计划
- 2016年12月16日 && 2016年12月18日 课堂笔记
- 2016年6月7日--6月21日(共2小时,剩2955小时)
- 【12月29日】
- 12月18日
- 2月29日
- 2月29日
- 2月29日
- 2月21日
- 2月18日
- 12月2日
- Cocomputing 12月30日1:30-4:45PM敏捷公开课邀请函(free)
- 2008年8月8日 8:00 PM 奥运时刻
- 第一天学习php 2016年12月29日
- Mysql表使用全文索引
- java运算符、表达式和语句
- centos 下 69 column window is too narrow
- SVN常用命令
- 如何自学Android编程
- work_note 2016年2月18日, PM 12:21:29
- 策略模式(Strategy 模式)
- STM32F030C8T6 STM32F030R8T6 STM32F030 STOP低功耗模式配置 11uA
- 让Linux系统启动过程自动运行自己编写的脚本
- Pod在墙内
- Activity类
- 双检查加锁优化模式
- servlet3 文件上传
- 求递增数列中所有A[i]=i的元素(阿里巴巴2013笔试题)