XAMPP Tutorial (i): xampp download, install, configure, run PHP Web project

Source: Internet
Author: User
Tags php write

Originally did not want to make PHP, but a classmate asked me to help start a PHP write the background. Really need to learn a bit.

Want to install XAMPP software, a collection of multiple servers, multiple databases, multiple background language management software.

First, Xampp download

Second, installation

Third, the configuration

Iv. running the project

First, Xampp download

Address 1: Official website https://www.apachefriends.org/zh_cn/download.html

Address 2: Baidu Cloud Disk Link: http://pan.baidu.com/s/1dFzQ5S9 Password: EMP9

Second, installation

Double-click Application

All the way Next

Just keep next.

Select the installation path

Start installation

Third, the configuration

Start the XAMPP software, start the Apache and MySQL two start button, if all become stop or the bottom does not eject red font error, congratulations, installation too smooth!

Start the Apache server with an error, as shown in

However, for most people, the port is reused because it has installed SQL Server or MySQL or IIS or Apache software. Therefore, the word "report" is often seen in the error window ~ ~ This time, the port needs to be modified.

Apache Port default is 80,mysql port default is 3306, also need to note, Apache configuration also need to configure the port of SSL, its default port 443.

You can change the port of Apache, MySQL, and SSL to: 81,3366,4433. The configuration file is described in detail below.

1, we first configure Apache and SSL.

In this picture, it is clear that there is a config button in the back of Apache, click the first file below: Apache (httpd.conf), this file is the configuration Apache port file, the file can be found under the installation path, As the author here: D:\software\programingsoftware\xampp\apache\conf\httpd.conf.

Open the file (httpd.conf), see 80 is changed to 81, a total of 2-3, modified to save. We're going to modify SSL, open Apache (httpd-ssl.conf) files, change all 443 to 4433, a total of 3-4, and then save. Then launch Apache. Haha, see it, can start up. Detailed parameters look at the picture bar. Know if it's running.

Verify that Apache is successful, enter localhost in the browser, and you can see that the installation was successful as shown in.

2, configure the environment of MySQL.

Click the Config button on the back of MySQL, select the My.ini file, the author's file in D:\software\programingsoftware\xampp\mysql\bin\ My.ini, open modify the inside of the frontal port, change 3306 port to 3366. (Note: If your MySQL can be started, do not configure, you do not need to look down.) ) A total of 5 places. Save after modification, try to start. If the launch succeeds, congratulations on your configuration to this end.

3. After normal startup

Iv. running the project

Open a Native server folder D:/xampp/htdocs create three project required HTML files, database SQL files, PHP files, the name suggested in English, because the Htdocs folder under the Chinese name is not conducive to outside access, may appear garbled phenomenon. I deleted the files from my previous htdocs and created my own project (or copied the project here).


1. Where do we put our own files to run? The answer is that in the Xampp\htdocs directory, if there is a index.php file, the file is executed first, and if it does not exist, access to localhost displays the site directory.

2, the current server is able to directly execute the PHP type of file. We create a new a.php file in the Xampp\htdoc directory, enter the code <?php echo ' Hello baidu! '; Open the browser to access localhost/a.php.

Now run the project and enter localhost/index.html in the browser. You can see the effect.

XAMPP Tutorial (i): xampp download, install, configure, run PHP Web project

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.