Php Development entry-level development environment establishment and corresponding file configuration

Source: Internet
Author: User
: This article describes how to set up the development environment and file configuration for php Development. For more information about PHP tutorials, see. Note made by yourself during the learning process.

I. What can php do?

Web pages can be programmed using JavaScript. However, JavaScript has limited capabilities. JavaScript usually runs in a browser (client). it can make special effects on a webpage: Move the mouse over the background to change the color, there are also common pop-up menus that move the mouse over the webpage. But if you want JavaScript to display the "total number of visitors to the website", it will be powerless, because it can only obtain client information, and "total number of visitors to the website" is stored on the server side. Therefore, another programming language that can be run on the server is required. the PHP language is one of them, because it can run on the Web server. So the characteristics of php can be summarized:

1. run on the server side. most of the WEB site data is stored on the server side. PHP is used to process the data stored on the server.

2. cross-platform. servers can be servers on multiple platforms, such as Linux, Windows, and Unix. In this way, the program writing efficiency can be improved.

3. scripting language. php is run by writing scripts, that is, a line of computer commands. it is similar to other scripts.

4. free trial.

II. download and install the wampServer integrated environment

W -- Windows; A -- Apache; M -- MySQL; P -- php. Because it is often put together for trial use during development, it is packaged into the wampserver integrated development kit-a powerful web development platform.

Download: www.wampserver.com; switch to the English version in the upper right corner to enter the download interface and select your operating system:

Select your favorite installation directory. Complete the installation as prompted.

When the green icon appears in the lower right corner of the screen:

Check whether the installation is successful. enter localhost in the browser and press Enter. if the following interface appears, it means it is done!

3. Getting started

Right-click the green icon on the right to select a language.

Click phpmyadmin shown in the icon as a visualized database management tool.

Www is the root directory for storing webpage files.

In the MySQL console under MySQL, enter the default wamp password in the pop-up window and press enter to process the database.

4. the wamp service is installed but cannot be started

Possible cause: the Apache port is occupied. Modify it to an unused port number. follow these steps to modify the default port number:

Click the icon to open httpd under Apache. in the conf configuration file, press ctrl + F and enter 80 and press Enter. modify listener 80 (to 8080). continue to search for the next one: ServerName Localhost: 80; Ctrl + S and restart the service. Because the default port is modified, the webpage accessed later is no longer localhost/test. php, but localhost8080/test. php;

5. modify the webpage root directory

As mentioned above, www is the root directory for storing webpage files. it can only be accessed by the server if it is put in www, but not everyone wants to put it in a file. in this case, some configuration files need to be modified. 1. click the green icon to open Apache> httpd. after the conf file is opened, press ctrl + f and enter documentroot to search for it. then, you can modify the file address in the configuration file, that is, the folder where you want to store web files. You need to modify the following two items: And . Press Ctrl + S to save it, and then click the icon to restart the service. Modifications to the configuration file must be restarted to take effect.

Next is the test

Create a. php file under your own file. For example, test. php Enter localhost/test. php in the browser URL and press enter. The output statement is successful. However, the www directory on the icon panel cannot be accessed. you need to modify the configuration file. Open the wamp folder and find the wampmanager. ini and wampmanager. tpl files. Open the wampmanager. ini file ctrl + F and enter menu. left to change the line of the wamp directory to the file path you want. Open the wampmanager. tpl file ctrl + F and enter menu. left to modify the following line:

To:



Then restart the service. Open the www directory and change it to the Demo directory.

Yanzi

2015 4 15

  • The size is 13.5 KB.
  • The size is 166.7 KB.
  • Size: 49 KB
  • The size is 25.7 KB.
  • The size is 13.2 KB.
  • View image attachments

The above introduces the development environment establishment and corresponding file configuration of php Development entry, including some content, 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.