本文实例讲述了PHP使用gmdate实现将一个UNIX 时间格式化成GMT文本的方法。分享给大家供大家参考。具体分析如下:
语法如下:
string gmdate (string $Format) string gmdate (string $Format, int $Time)
演示代码
<"When this page was loaded,\n"; echo 'It was then ', gmdate ('r'), "\n"; echo 'The currend gmdate was ', gmdate ('F j, Y'), "\n"; echo 'The currend gmdate was ', gmdate ('M j, Y'), "\n"; echo 'The currend gmdate was ', gmdate ('m/d/y'), "\n"; echo 'The currend gmdate was the ', gmdate ('jS \o\f M, Y'), "\n"; echo 'The currend time was ', gmdate ('g:i:s A T'), "\n"; echo 'The currend time was ', gmdate ('H:i:s O'), "\n"; echo gmdate ('Y'); gmdate ('L')" a leap year\n"; echo time ('U'), " seconds had elapsed since January 1, 1970.\n"; "htmlcode">When this page was loaded, It was then Sun, 27 Dec 2009 13:08:53 +0000 The currend gmdate was December 27, 2009 The currend gmdate was Dec 27, 2009 The currend gmdate was 12/27/09 The currend gmdate was the 27th of Dec, 2009 The currend time was 1:08:53 PM GMT The currend time was 13:08:53 +0000 2009 is not a leap year 1261919333 seconds had elapsed since January 1, 1970.希望本文所述对大家的php程序设计有所帮助。
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年11月18日
2024年11月18日
- 群星《说唱梦工厂 第10期》[320K/MP3][99.5MB]
- 李嘉.1996-思念过秋冬【点将】【WAV+CUE】
- 汪峰.2009-信仰在空中飘扬【星文】【WAV+CUE】
- 尤长靖.2023-肆无忌惮的恋人(EP)【FLAC分轨】
- 群星《说唱梦工厂 第10期》[FLAC/分轨][544.11MB]
- 群星《歌手2024 第12期》[320K/MP3][105.71MB]
- 群星《歌手2024 第12期》[FLAC/分轨][566.89MB]
- 群星《骷髅之舞》韩日慢摇K2HD[WAV+CUE]
- 张含韵《我很张含韵》首版[WAV+CUE]
- 群星《天域原音·聆听雪域藏歌STS+SRS》[WAV+CUE]
- 尤长靖.2020-AZORAland·我是尤长靖【香蕉娱乐】【FLAC分轨】
- 群星.1995-台北爱情故事【飞碟】【WAV+CUE】
- 群星.2024-锦绣安宁电视剧原声带【D-Jin.Music】【FLAC分轨】
- 群星《闪光的夏天 第4期》[320K/MP3][97.82MB]
- 群星《闪光的夏天 第4期》[FLAC/分轨][553.31MB]