开发者

How can I get the current date and time using PHP [duplicate]

This question already has answers here: 开发者_JAVA百科 Closed 12 years ago.

Possible Duplicate:

Get current date and time in PHP

I was wondering how can I get the current date and time using PHP.


echo time();
echo date('Y-m-d H:i:s');

http://php.net/manual/en/ref.datetime.php


The date() command (as suggested by deceze) can do all of the above

A good quick reference is http://www.wdvl.com/Authoring/Languages/PHP/Date_Time/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜