What is the relationship between apache+php+mysql+javascript+html+css

l: The operating system, that is, the bottom layer based on computer hardware, is equivalent to the concept of a country, and windows or linux are equivalent to different countries.

a: It is a web server, which is equivalent to a national leader: it plays a guiding role.

m: It is the database, where data is stored, quite a bank.

p: It is php, which is equivalent to a subordinate, a person who does things.

 

All applications of PHP are executed through WEB server (such as IIS or Apache) and PHP engine program interpretation and execution

work process:

(1) When the user enters the file name of the PHP page to be accessed in the browser address, and then presses Enter, an http request will be sent, and the request will be transmitted to a WEB server that supports PHP.

(2) The WEB server accepts the request and judges it according to its suffix. If it is a PHP request, the WEB server takes out the PHP application that the user wants to access from the website root directory and sends it to the PHP engine program.

(3) The PHP engine program calls the relevant php modules to process the files sent by the WEB server to scan from the beginning to the end, and reads and processes the data from the background according to the commands, and dynamically generates the corresponding HTML pages.

(4) The PHP engine returns the generated HTML page to the WEB server. The WEB server then returns the HTML page to the client browser.

(5) There will be css code, javascript, and jquery in the html page. These codes are interpreted and executed by the browser and translated into visual graphics for visitors to watch.

(6) mysql has nothing to do with php and apache. He only negatively accesses data and controls it through sql statements, and php controls sql statements, that is, php controls mysql

 

Summarize:

That is to say, php is a plug-in program of apache, and it must rely on the web server to run. Simple flowchart:

When the client browser accesses the php file ---> request to the apache server ---> hand it over to the php engine program ---> hand it over to the php related module for processing ---> generate the corresponding html page ---> transfer Give the apache server ---> respond to the data to the browser ---> the browser interprets and executes html, css, javascript ---> access to see the relevant data

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326435158&siteId=291194637