The PHP header function sets an example of an HTTP message header,
Define the encoding header (' Content-type:text/html;charset=utf-8 ');Atomheader (' Content-type:application/atom+xml ');Cssheader (' Content-type:text/css ');Javascriptheader ('
Common HTTP header settings for PHP header functions, Phpheader functions
Okheader (' http/1.1 OK ');//Set a 404 Header: Header (' http/1.1 404 Not Found ');//Set address is permanently redirected header (' http/1.1 301 Moved Permanently ');//Go to
PHP header sets the common file type of Content-type,
In PHP, you can send header information through the header function, you can also set the file Content-type, the following collation of some common file types for the Content-type value.
Date 201
Differences between http1.0 and http1.1
Write a segment proxy todayProgramIn the returned data, when the header is followed by \ n, a three-bit hexadecimal value is displayed, followed by a data segment, an error occurs when a value of 0 is
The following method can be used to set the HTTP response header in a Servlet program. These methods are available through the HttpServletResponse object.
1 String encoderedirecturl(StringUrl)
Encodes the specified URL used in the
HTTP State code (HTTP status codes)Some of the common status codes are: A 1xx (temporary response) represents a temporary response and requires a status code for the requester to continue the operation. Code description100 (continued) The
The more ideal method of interpretation should be defined by the expression pattern of "state: Task (target) + process + performance (or feature)".Full-textIn "Pragmatic Ajax A Web 2.0 Primer" accidentally see the introduction of Readystae state,
1XX (Temporary response)A status code that represents a temporary response and requires the requestor to continue the operation.100 (continued) The requesting person shall continue to make the request. The server returns this code to indicate that
Some of the common status codes are: $-Server successfully returned to Web page404-The requested page does not exist503-Service Not availableAll State explanations:1XX (Temporary response)A status code that represents a temporary response and
1XX (Temporary response)A status code that represents a temporary response and requires the requestor to continue the operation.Code description100 (continued) The requesting person shall continue to make the request. The server returns this code to
Successful status code:200– server successfully returned to Web page304– not modifiedFailed status code:404– The requested page does not exist503– Server is temporarily unavailable500– Server Internal ErrorThe following is not very common, remember
HTTP status codes (various error code collections)Continue the initial request has been accepted and the customer should continue to send the remainder of the request. (HTTP 1.1 new)101 Switching Protocols Server translates the client's request to
OK
301 Moved Permanently
302 Found
304 Not Modified
307 Temporary Redirect
Request
401 Unauthorized
403 Forbidden
404 Not Found
410 Gone
Internal Server Error
501 Not implemented
ContinueThe initial
Original: http://www.67bar.com/archives/1229HTTP consists of two parts: request and response. When you enter a URL in a Web browser, the browser creates and sends a request based on your request, which contains the URL you entered and some
Fallen for a while, today opened the blog, found that even login username and password are not remember. More than half of the 2016, can not be so wandering down.Participated in the NetEase micro-front-end siege lion training, currently carried out
In the website log , we often see a lot of HTTP code returned, such as 201, 304, 404, and so on. However, these specific return HTTP code exactly what the meaning of it, do a bit of knowledge in this, remember it doesn't matter, then look at the
You need to download all the files under a directory. The command is as followsWget-c-r-np-k-l-p www.xxx.org/pub/path/At download time. Useful for images or connections to external domain names. Use the-h parameter if you need to download it at the
1, 200: normal. 2, 201: The server has created a document, the location header gives its URL. 3, 202: The request has been accepted, but the processing has not been completed. 4, 203: The document has returned normally, but some of the answer
HTTP (hypertexttransferprotocol) is an abbreviation for Hypertext Transfer Protocol, which is used to transmit data of WWW mode, please refer to RFC2616 for details of HTTP protocol. The HTTP protocol uses the request/response model. The client
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.