开发者

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

开发者 https://www.devze.com 2023-01-21 10:22 出处:网络
This question already has answers here: 开发者_JAVA百科 Closed 12 years ago. Possible Duplicate: Get current date and time in PHP
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

精彩评论

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