Home  >  Article  >  Backend Development  >  How to set up a php environment in Windows system_PHP tutorial

How to set up a php environment in Windows system_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:12:19821browse

PHP introduction:
PHP’s unique syntax mixes C, Java, Perl and PHP’s own syntax. It can execute dynamic web pages faster than CGI or Perl. Compared with other programming languages, dynamic pages made with PHP embed programs into HTML documents for execution, and the execution efficiency is much higher than CGI that completely generates HTML tags; PHP can also execute compiled code, and the compilation can Achieve encryption and optimize code running, making the code run faster.

Building the PHP environment:
The PHP environment can be built using integrated software (that is, integrating php, apache, and mysql), or you can download it yourself: php , apache, mysql to build.

Because many PHP beginners spend a lot of effort in setting up the environment and lose interest in learning PHP. Therefore, the editor recommends beginners to use integrated software to build the environment. As the learning continues to deepen, Go back and understand the environment. In other words, let everyone set up the environment first, learn the basic knowledge of PHP, cultivate interest in PHP, and then go back and study what is going on in the local environment.

There are two main types of software to build a PHP environment:
1.
wamp is suitable for building an environment when learning and researching PHP
2. appserv is suitable for setting up a server environment

It is recommended to use wamp when learning PHP.
Installing wamp is very simple, and it is recommended to use the default configuration for installation.
After installation, enter localhost in the browser and press Enter. If the homepage of wamp appears, it proves that the installation is successful and the environment is configured successfully.


After installation, a wamp folder will be generated in the root directory of drive C by default (it is similar if installed on other drives). In the wamp folder, there is a www directory.

We first need to open the wamp program, which is the local environment.
We create a new test.php file in the www directory,

Then enter:

Enter localhost/test.php in the browser

Output
hello world

In other words, localhost corresponds to the www directory, which can be accessed by entering the file address in the browser.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/313665.htmlTechArticlePHP introduction: PHP’s unique syntax mixes C, Java, Perl and PHP’s own syntax. It can execute dynamic web pages faster than CGI or Perl. Dynamic pages made with PHP and other editors...
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