不知怎么的,我成功地让这个日期生效了,
<td width="67"><font size="3"><b>*Date</b></td>
<td width="3">:</td>
<td width="168"><input name="adate" type="text" id="adate" maxlength="20" value="<?php echo date("Y/m/d") . "<br />"; ?>">如何在此表单中回显时间:
<td width="67"><font size="3"><b>*Time</b></td>
<td width="3">:</td>
<td width="168"><input name="adtime" type="text" id="adtime" maxlength="15">
</td>发布于 2010-03-05 08:51:51
这取决于您想要的时间格式。
php date() function有许多不同的方式来表示时间。如果你只想要HH:MM:SS,你可以这样做:
<td width="168"><input name="adtime" type="text" id="adtime" maxlength="15" value="<?php echo date("H:i:s") ?>">发布于 2010-03-05 08:51:13
发布于 2010-03-05 08:56:06
我的建议是,如果你在PHP 中使用CodeIgniter,CakePHP或者Zend这样的框架进行编程。不要凭空编写代码,除非你确实需要这样做。
https://stackoverflow.com/questions/2383796
复制相似问题