thinkPHP的模版格式化时间的有关问题

WBOY
Release: 2016-06-13 10:34:02
Original
838 people have browsed it

thinkPHP的模版格式化时间的问题
我在模版上格式化时间

HTML code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><eq name="vo.rectype" value="1">{$vo['recstart']|date="Y-m-d H:i:s",###}</eq><eq name="vo.rectype" value="2">{$vo['recstart']|date="Y-m-d",###}</eq>
Copy after login

怎么输出的是
HTML code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1970-01-01 
Copy after login

这是为什么啊? 急求。。。。

------解决方案--------------------
不会啊 ,帮你顶一下
------解决方案--------------------
date()函数是那么用的?不是date("Y-m-d H:i:s")这样?
------解决方案--------------------
{$vo['recstart']}
输出的是什么?
------解决方案--------------------
应该是$vo['recstart']的值为null或者为0了,导致输出的时间为1970-01-01。
你再检查下你后台的赋值。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template