Php --- local development and test environment setup (Wamp)

Source: Internet
Author: User
Tags php software
: This article mainly introduces php-local development and test environment setup (Wamp). If you are interested in PHP tutorials, refer to it. 1 Overview

Use the simplest web development environment-WAMP integrated installation environment, that is, Windows + Apache + Mysql + PHP software integration. In this way, we can save the software installation and configuration work, which is a good choice for new users. For php text editing, you can use notepad or advanced text editor, such as EditPlus. Of course, you can also use powerful integrated development tools, such as Eclipse.

2. WEB environment construction

Wampserver Download: http://www.wampserver.com/

Wampserver Attachment link: http://pan.baidu.com/s/1c0m6C6G password: w27l

Wampserver Version 2.4 64-bit

There are many online installation tutorials. References: http://jingyan.baidu.com/article/c45ad29cd4b357051753e2a0.html

3. basic WAMP configuration

[Language configuration]

Right-click ---> Language ---> chinese

[Configure Apache to allow Internet access]

Left Click ---> Apache ---> httpd. conf

The modification content is as follows:

Order Deny, Allow

Allow from all

# Allow from 127.0.0.1

Allow from: 1

Allow from localhost

[Allow the use of php code to start marking the use of short labels]

Left Click ---> PHP settings ---> short open tag check

[Change database password]

Mysql does not have a password by default.

① Open the Mysql console of WAMP and prompt you to enter the password. if the start password is blank, press enter: Left Click ---> MySQL console

② Enter [use mysql] and the console prompts [Database changed]

③ Enter [update user set password = PASSWORD ('password to be changed ') where user = 'root';] and the console prompts [Query OK, XXXXXXXXX]

④ Enter [flush privileges;] and submit

⑤ Enter [quit] to exit.

6. find the [config. inc. php file, modify [$ cfg ['servers'] [$ I] ['password'] = '']; it is [$ cfg ['servers'] [$ I] ['password'] = 'password to be modified ';].

7. restart the service. The username is root and the password is changed.

[Change Apache port to 80] Left Click ---> Apache ---> httpd. conf

The modification content is as follows:

Listen 80

Then restart the server.

[Current website root directory configuration]

Left Click ---> Apache ---> httpd. conf

The modification content is as follows:

DocumentRoot "d:/wamp/www/bbs"

Change the root directory to bbs. the default value is the www directory, which is valid when the server is restarted.

4. test configuration

When the port is changed to 80, open the browser and enter http: // localhost/

Test whether the database can be logged on:

Http: // localhost/phpmyadmin/

The above introduces php-local development and test environment setup (Wamp), including some content, and hope to be helpful to friends who are interested in PHP tutorials.

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.