The date () function is one of the dates that we often encounter and use in PHP development, let me introduce some basic dress and method of date () function, and have a friend who needs to know to enter into the referenceDate-time functions are a
The whole earth is divided into twenty-four time zones, each of which has its own local time. For international radio communication, a unified time is used for the sake of unification, called Universal coordination Time (UTC, Universal Time
1. Get the screen width and height + set the application width and height in the code
// Screen rectangle mrect = new rect (0, 0, this. getwindowmanager (). getdefadisplay display (). getwidth (), this. getwindowmanager (). getdefadisplay display ().
I. chicken ribs
UTC, Coordinated Universal Time, coordinates world time, is the well-known Greenwich Mean Time (GMT)
Calendar time: indicates the calendar time. The so-called calendar time is the time represented by "the number of seconds passed by
AddDate_default_timezone_set (PRC);/* set the time to Beijing Time, and PhP5 is the Greenwich Mean Time by default */Date () A: "am" or "PM"A: "am" or "PM"D: day (s), double-digit number. If it is not enough, it will be zero. From "01" to "31"D: The
Nowadays, more and more work needs to use the time zone concepts around the world. Recently, I have seen abbreviations such as DST, EDT, PDT, wet, and CCT in my documents, which makes me dizzy. So I made a memo on the Internet:
The time zone
The android initialization language contains four types of statements: Actions (Action), commands (command), services (service), and options (options ).
All of these are in the unit of action, and various marks are separated by spaces. The C-style
How can c ++ obtain the system time?
// Solution-advantage: only the C standard library is used; disadvantage: only seconds are allowed# Include # Include Int main (void){Time_t t = time (0 );Char TMP [64];Strftime (TMP, sizeof (TMP), "% Y/% m/% d %
Header ('HTTP/1.1 200 OK ');
// Set a 404 header:Header ('HTTP/1.1 404 Not found ');
// Set the address to be permanently redirectedHeader ('HTTP/1.1 301 moved permanently ');
// Go to a new addressHeader ('location: http://www.example.org /');
//
Definition and UsageThe date () function formats a local time/date.Syntaxdate (Format,timestamp)Parameterdescriptionformat Required. Specifies how to return the result:
D-the Day of the month (from 31)
D-a Textual representation of A Day
In PHP, sort the parameters related to the date () date function. For more information, see.
In PHP, sort the parameters related to the date () date function. For more information, see.
Add
Date_default_timezone_set (PRC);/* set the time to
PHP: time (), date (), mktime () date and time function libraries are often forgotten. here, you can add them to your favorites for convenience: checkdate: to verify the correctness of the date.
Date: format the server time.
Strftime: format the
Explore the usage of headers in php. Header () isusedtosendrawHTTPheaders. SeetheHTTP1.1specificationformoreinformationonHTTPheaders. Example 1: Copy the code as follows :? PHPHeader (Location: http:
Header()Is used to send raw HTTPHeaders. See the
Brief introduction to HTTP message header webpage cache control and common header commands. The Cache of web pages is controlled by "cache-control" in the HTTP message header. common values include private, no-Cache, max-age, and must-revalidate,
This article provides a detailed analysis of HTTP message header webpage cache control and common header commands, for more information, see "Cache-control" in the HTTP message header, common values include private, no-cache, max-age, and
PHP uses the header function to set the HTTP header to parse the header. Copy the code as follows: define the encoding header (Content-Type: texthtml; charsetutf-8); Atomheader (Content-type: applicationatom + xml); CSSheader (Conten as follows:
Detailed description of some common headers. Common header commands include HTTP-Version, Status, and Reason-Phrase ).
Common header commandsThe header is divided into three parts:The first part is the HTTP Version );
The second part is the Status
Share the Control List of PHP time formats. The format character specifies the return value. for example, the day in the month ------ d, the number of the day in the month contains the 2nd digit of the leading zero, 01 to 31j, and no leading zero, 1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.