PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date ().
Date_atom (String)
Atomic clock format (eg: 2005-08-15t15:52:01+00:00)
Date_cookie (String)
HTTP cookie format (e.g. Mon, 2005 15:52:01 UTC)
date_iso8601 (String)
ISO-8601 (eg: 2005-08-15t15:52:01+0000)
date_rfc822 (String)
RFC 822 (e.g.: Mon, 2005 15:52:01 UTC)
date_rfc850 (String)
RFC 850 (for example: Monday, 15-aug-05 15:52:01 UTC)
date_rfc1036 (String)
RFC 1036 (for example: Monday, 15-aug-05 15:52:01 UTC)
Date_rfc1123 (String)
RFC 1123 (e.g.: Mon, 2005 15:52:01 UTC)
date_rfc2822 (String)
RFC 2822 (eg: Mon, 2005 15:52:01 +0000)
Date_rss (String)
RSS (eg: Mon, 2005 15:52:01 UTC)
DATE_W3C (String)
World Wide Web Consortium (e.g., 2005-08-15t15:52:01+00:00)
For example, to output a date format that RSS requires, you can simply implement it with the following code:
"Related articles"
http://www.bkjia.com/PHPjc/446777.html www.bkjia.com true http://www.bkjia.com/PHPjc/446777.html techarticle PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date (). Date_atom (string) atomic clock format (eg: 2005-08-15t15:52:01+00 ...