Home > Backend Development > PHP Tutorial > PHP environment building tutorial-detailed graphic and text explanation

PHP environment building tutorial-detailed graphic and text explanation

不言
Release: 2023-03-22 16:32:02
Original
43186 people have browsed it

This article uses a combination of pictures and text to introduce you in detail about how to build an environment with PHP. It also introduces you to some of the advantages of PHP. Interested friends can refer to it.

PHP environment building tutorial-detailed graphic and text explanation

Related recommendations:

●《The 6 best php environment building tools in 2021 Recommended

●《php environment configuration tutorial: PHP development environment integrated installation and independent installation video tutorial

●《mac php environment setup Tutorial: mac php development environment setup and configuration tutorial

Overview of what is PHP

##PHP( Hypertext Preprocessor (Hypertext Preprocessor) is a server, cross-platform, HTML-embedded scripting language. Its unique syntax mixes the characteristics of C language, Java language and Perl language. It is a widely used open source A multi-purpose scripting language, especially suitable for web development.

PHP is a B/S (Browser/Server, browser/server) architecture and a three-tier structure. After the server is started, users can access it using only a browser without using client software, which not only maintains the graphical user interface, but also greatly reduces the amount of application maintenance.

Advantages of PHP language

PHP originated from free software and open source code. Using PHP to develop Web applications has the following advantages .

High security: PHP is open source software, everyone can see all PHP source code, the way the program code is compiled with Apache makes it The security settings are more flexible. PHP has recognized security properties.

Cross-platform features: PHP supports almost all operating system platforms, and supports multiple web servers such as Apache and IIS.

Supports a wide range of databases: Can operate a variety of mainstream and non-mainstream databases, such as MySQL, Access, SQL Server, Oracle, DB2, etc., among which PHP and MySQL is currently the best combination, and their combination can run across platforms.

Easy to learn: PHP is embedded in HTML language, mainly scripting language, with rich built-in functions, simple syntax and easy writing, making it easy for readers to learn and master.

Fast execution speed: It takes up less system resources and the code execution speed is fast.

Free: In the popular enterprise application LAMP platform, Linux, Apache, MySQL, and PHP are all free software. This open source free framework can provide Website operators save a lot of money.

Templating: Realizes the separation of program logic and user interface.

Supports object-oriented and process: Supports two development styles, object-oriented and process, and is backward compatible.

Built-in Zend acceleration engine, stable and fast performance.

New features of PHP5

·Constructor and destructor.

#·Object reference.

#·Clone of the object.

#·Private, public and protected modes in objects.

·interface.

·Abstract class.

·__call.

·__set and __get.

·Static member.

Click here to view the PHP Chinese manual

Using the AppServ combination package under Windows

Combination package is to package Apache, PHP, MySQL and other server software and tools after installation. Developers only need to unzip the configured package to the local hard drive and use it without further configuration. The combination package enables the rapid establishment of a PHP development environment. For programmers who have just started learning PHP, it is recommended to use this method to build a PHP development environment. Although the combination package is much less flexible, it is easy to install, fast and stable, so it is more suitable for beginners.

There are many popular combination packages on the Internet. Here are three recommended combination packages: EasyPHP, AppServ and XAMPP. For novices, it is recommended to use EasyPHP or AppServ, while XAMPP is more complicated.

Click to download the AppServ package:

As shown below:

PHP environment building tutorial-detailed graphic and text explanation

AppSer integrated installation package construction

1. Double-click the AppServ file , open the startup page as shown below:

PHP environment building tutorial-detailed graphic and text explanation

2. Click the Next button to open the AppServ installation agreement page as shown below:

PHP environment building tutorial-detailed graphic and text explanation

3. Click the I Agree button to open the page as shown below. On this page, you can set the installation path of AppServ (the default installation path is generally c:\AppServ). After the AppServ installation is completed, Apache, MySQL, and PHP will be stored in this directory in the form of subdirectories:

PHP environment building tutorial-detailed graphic and text explanation

4. Click the Next button to open the page as shown below, where you can select the programs and components to be installed (the default is all selected):

PHP environment building tutorial-detailed graphic and text explanation

5. Click the Next button to open the page as shown below. This page mainly sets the Apache port number:

The setting of the Apache port number is very important, it directly It is related to whether the Apache server can be started successfully. If port 80 on this machine is occupied by IIS or Thunder, then the server configuration cannot be completed if port 80 is still used here. This problem can be solved by modifying the port number here, or modifying the port number of IIS or Thunder.

PHP environment building tutorial-detailed graphic and text explanation

#6. Click the Next button to open as shown in the figure below. This page mainly sets the login password and character set of the root user of the MySQL database. Here, the character set Set to

"GB2312 Simplified Chinese", which means that the character set of the MySQL database will be in Simplified Chinese form:

PHP environment building tutorial-detailed graphic and text explanation

7. Click the Install button to start the installation. , as shown below:

PHP environment building tutorial-detailed graphic and text explanation

8. The following picture shows the interface after the installation is completed:

PHP environment building tutorial-detailed graphic and text explanation

After installing AppServ, the entire The directory is installed in the "c:AppServ" path by default. This directory contains several subdirectories:

PHP environment building tutorial-detailed graphic and text explanation

Open the browser and enter "http://localhost/" in the address bar [The port number you set, if it is 80, you don’t need to fill it in]". If you open the following picture, it means that the AppServ installation is successful:

PHP environment building tutorial-detailed graphic and text explanation

With the development of PHP, a large number of excellent Development tools have emerged one after another. Finding a tool that suits you will not only speed up your learning progress, but also enable you to discover problems in time during the future development process and avoid detours. The development tool we choose is Dreamweaver. Please refer to the online information for detailed project creation.

Related recommendations:

PHP development kit php7 php environment construction PHP from entry to proficiency

PHP environment construction (php+Apache+ mysql) Detailed introduction

PHP environment construction-WAMP+Zend

The above is the detailed content of PHP environment building tutorial-detailed graphic and text explanation. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template