Home  >  Article  >  Backend Development  >  The relationship between php, apache and mysql

The relationship between php, apache and mysql

小云云
小云云Original
2017-11-11 17:30:429259browse

Nowadays, PHP has become a widely popular programming language. To use a PHP program, you need to build a PHP running environment. Building a PHP local environment is a PHP+Apache+Mysql environment, so that you can run PHP on your computer. program. So, what is the relationship between apache, php, and mysql in the PHP environment?

Apache

It is web server software. Similar products include Microsoft's IIS, etc. The function is to allow a certain computer to provide www service. In the local environment, the local website can be accessed through the IP 127.0.0.1.

PHP

It is a server-side language interpretation software. After being loaded by the apache software, it enables apache to add the function of interpreting php files so that this server can run php programs. The access method is as follows:

address/filename.php.

MYSQL

It is a small relational database software. It provides database support for various software, and the data saved by the PHP site is generally stored in a MYSQL database. Of course, you can also choose other databases, not necessarily just MYSQL, but usually the "relationship" between MYSQL and PHP is very good.

Note: The php file must be in the working directory configured by apache. Not the installation directory.

dreamweaver visual web page editing software. Can be used to write most website scripts. For example HTML CSS ASP PHP etc. But it's limited to editing code. Provides visual editing for visual parts. It cannot run server-side dynamic script programs, such as ASP PHP and other web page programs that require server-side interpretation to run. .

Additional explanation: If only from the perspective of writing code. You can write in the notepad that comes with the system. You don't have to use dreamweaver. It’s not bad for writing CSS HTML. Writing PHP is no different than writing with Notepad. . Anyway, you can't see the effect after running. .
PHP environment: A computer running apache, and the apache has loaded php. The database is not required software. If you don't need a database, you don't need to install it. The version number is not important. The new version has more features. Security is better.

This is the relationship between php, apache, and mysql. After understanding the relationship between them, it will be easier to learn PHP.

Related recommendations:

The relationship between PHP and MySQL

The above is the detailed content of The relationship between php, apache and mysql. 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