thinkphp 5 在页面输出当前时间

我遇到的使用场景是<input>默认为当前时间,代码如下:

<input name="starttime" id="starttime" type="text" class="input_245_34 fl" value="{$department['starttime']|default=time()|date='Y-m-d',###}">
  1. time():输出当前时间戳
  2. date='Y-m-d',###:格式化为日期形式
原文地址:https://www.cnblogs.com/shellon/p/12782121.html