Home  >  Article  >  Backend Development  >  What is the relationship between php and apache?

What is the relationship between php and apache?

青灯夜游
青灯夜游Original
2019-10-16 11:47:463622browse

For example, when we practice how to build a website on our own computer, we need to build a local environment. This local environment is the PHP APACHE MYSQL environment, so that our computer can have PHP requirements. operating environment. So what is the relationship between php and apache.

What is the relationship between php and apache?

Apache: web server software, responsible for responding to all received web requests.

Similar products include Microsoft's IIS, etc. The function is to allow a certain computer to provide www services. In the local environment, you can access the local website through the IP 127.0.0.1.

PHP: It is a server-side language.

After being loaded by apache, enable apache to add the function of interpreting php files. So that this server can run php programs. The access method is as follows: address/file name.php

The relationship between php and apache

We can think of the server as a restaurant, and apache is the food delivery of the store Member, php is the chef in the kitchen.

Some drinks (static resources, such as HTML, CSS, JS, Images, etc.) are directly delivered to the customer (Client) by the waiter without going through the chef.

If you need the dishes cooked by the chef (for example: *.PHP, etc.), you need to wait for the chef to finish cooking the original ingredients (php) into edible meals (static resources), and the waiter Only then can the food be served.

For more PHP related knowledge, please visit php中文网!

The above is the detailed content of What is the relationship between php and apache?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn