: This article mainly introduces the web network request process _ PHP version to be updated). If you are interested in the PHP Tutorial, please refer to it. When browsing and inputting an address, how does it request to the server and display the page information?
Enter an http address in the browser, such as http: // localhost/
--> The browser requests the DNS server to obtain the corresponding IP address.
--> Find the corresponding server (for example, Apache server) through the IP address)
--> When the server receives a request, it parses the Url character to obtain the file path name after the IP address in the URL.
--> 1. check whether there are html, css, and xml files in the web Directory of the server. if any of them are directly returned to the browser, the browser displays and parses the returned data.
--> 2. if the requested php component, such as http: // localhost/info. if php cannot be processed by Apache, it will be transferred to the PHP program for processing, and PHP will return the processing result to Apache in the form of html, and Apache will return the result to the browser.
Therefore, when installing Apache and PHP, you need to associate Apache with PHP. When Apache requests the php file, it is transferred to the PHP program for processing.
Copyright Disclaimer: This article is an original article, and the Reprinted article must indicate the source. the viewpoint of this article only represents the current opinion, which must be insufficient. thank you very much for your attention!
The above introduces the web network request process _ PHP version to be updated), including some content, hope to be helpful to friends who are interested in PHP tutorials.