专业英语W1
Building Web Application in PHP
问题描述
Please describe in your own words what will happen to your brower and the web server when you click a link on a web page. Please provide as many details as possible, for instance, what HTTP message will be transmitted from the browser to the server.
Your anwser must be in English.
我的回答
Generally, there is a Request and Response Cycle to be finished when I click on a web page. Firstly, the web browser which is located in my computer will do on my behalf as a client. It will parse the URL which the anchor tag with an href = value shows and figure out which web server it will send a GET Request to, thus making a connection to the web server. Secondly, after the browser sending the GET Request, the web server receive the Request and will do some PHP things, then making the connection to the Database server. Thirdly, having interacted with the Database server, the web server will make a Response back to the web browser with a HTML document. Finally, the web browser which receive the Response will parse the document and run the document object model(DOM). Then the whole page that we users see will entirely be rendered by the web browser and shown on the screen.
2020.3.17更新 老师的反馈
when receiving a GET request, the web server doesn’t necessarily run php. It depends on what code is in the html file.
actually I am not very clearly about PHP.