开发者

Current Datetime in PHP

开发者 https://www.devze.com 2022-12-14 06:17 出处:网络
I can\'t just make this work. How can i display the current date in PHP in the format YYYYMMDDHHMMSS. Regards

I can't just make this work.

How can i display the current date in PHP in the format YYYYMMDDHHMMSS.

Regards

Mat开发者_如何学JAVAt


Try

echo date('YmdHis');


Use date:

echo date("YmdHis");

That'll display the current date in the format you asked for in the timezone of whatever machine PHP is running on.

0

精彩评论

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

关注公众号