您好,欢迎访问一九零五行业门户网

PHP 5中新增加的日期(date)函数的常量_PHP教程

php 5.1.1起定义有以下常量来提供标准日期表达方法,可以用于日期格式函数(例如 date())。
date_atom(string)
原子钟格式(如:2005-08-15t15:52:01+00:00)
date_cookie(string)
http cookies 格式(如:mon, 15 aug 2005 15:52:01 utc)
date_iso8601(string)
iso-8601(如:2005-08-15t15:52:01+0000)
date_rfc822(string)
rfc 822(如:mon, 15 aug 2005 15:52:01 utc)
date_rfc850(string)
rfc 850(如:monday, 15-aug-05 15:52:01 utc)
date_rfc1036(string)
rfc 1036(如:monday, 15-aug-05 15:52:01 utc)
date_rfc1123(string)
rfc 1123(如:mon, 15 aug 2005 15:52:01 utc)
date_rfc2822(string)
rfc 2822(如:mon, 15 aug 2005 15:52:01 +0000)
date_rss(string)
rss(如:mon, 15 aug 2005 15:52:01 utc)
date_w3c(string)
world wide web consortium(如:2005-08-15t15:52:01+00:00)
比如,要输出一个rss需要的日期格式,就可以用下面的代码简单实现:
echo date(date_rss);

【相关文章】
http://www.bkjia.com/phpjc/446777.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/446777.htmltecharticlephp 5.1.1起定义有以下常量来提供标准日期表达方法,可以用于日期格式函数(例如 date())。 date_atom(string) 原子钟格式(如:2005-08-15t15:52:01+00...
其它类似信息

推荐信息