thinkphp前台格式化输出日期

来源:互联网 发布:知乎 苏德战争 编辑:程序博客网 时间:2024/06/05 05:18

thinkphp格式化输出

{$time|strtotime|date="Y年m月d日",###}


$time 是日期字符串,一般后台的时间是"Y-m-d h:i:s"

strtotime()把字符串转化为时间整数

date(format, timestamp) 把整数时间timestamp按照format格式转换为字符串

"###"表示前面的变量在date函数中的传入位置


1 0
原创粉丝点击