您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP日期函数date格式化UNIX时间的方法_PHP

2024/2/18 21:51:59发布21次查看
本文实例讲述了php日期函数date格式化unix时间的方法。分享给大家供大家参考。具体分析如下:
日期函数可以根据指定的格式将一个unix时间格式化成想要的文本输出
使用到函数语法如下
string date (string $format);string date (string $format, int $time);
下面是演示代码

输出结果如下
it was then sat, 26 dec 2009 07:09:51 +0000the currend date was december 26, 2009the currend date was dec 26, 2009the currend date was 12/26/09the currend date was the 26th of dec, 2009the currend time was 7:09:51 am gmtthe currend time was 07:09:51 +00002009 is not a leap year1261811391 seconds had elapsed since january 1, 1970.
希望本文所述对大家的php程序设计有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product