Add the constant of the date function in the PHP5 program. The following constants are defined in PHP5.1.1 to provide standard expression methods for date formats (such as date ()). DATE_ATOM (string) atomic clock format (for example,: 15t15: 52: 01 + 0 PHP 5.1.1) the following constants are defined to provide a standard date expression method, it can be used for date format functions (such as date ()).
DATE_ATOM (string)
Atomic clock format (for example, 2005-08-15T15: 52: 01 + 00: 00)
DATE_COOKIE (string)
HTTP cookie format (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_ISO8601 (string)
ISO-8601 (e.g.: 15t15: 52: 01 + 0000)
DATE_RFC822 (string)
RFC 822 (for example, Mon, 15 Aug 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 (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_RFC2822 (string)
RFC 2822 (for example, Mon, 15 Aug 2005 15:52:01 + 0000)
DATE_RSS (string)
RSS (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_W3C (string)
World Wide Web Consortium (for example, 2005-08-15T15: 52: 01 + 00: 00)
For example, to output a date format required by RSS, you can simply implement it using the following code:
Echo date (DATE_RSS );
Http://www.bkjia.com/PHPjc/814353.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/814353.htmlTechArticlePHP 5.1.1 defines the following constants to provide standard date expressions that can be used for date format functions (such as date ()). DATE_ATOM (string) atomic clock format (for example, 2005-08-15T15: 52: 01 + 0...