Recently in the study of PHP, how to build a PHP development environment to spend a lot of time, the network is said to be some semi-finished products, most of them are reprinted with each other article, here to my own groping the process of the realization of the record for everyone to learn reference.
Because I was doing Java development, so the computer has JDK these environments, all I do not start from scratch, My Computer environment is: XP system, JDK1.6. If you use eclipse in the way you have to install the JDK environment on the computer, for the installation of software I will not be too much detail, I am here mainly to introduce the software after the installation of the configuration.
Software Environment:
JDK1.6
Wampserver
Eclipse-php-helios
When the software is installed after the specific configuration steps are as follows:
1, start Wampserver software in the lower right corner of the computer will have a small icon
A small red icon in the red box. Left click on the small icon in the pop-up menu, click "Start all Services" Under normal circumstances, the small red icon will turn green. Indicates that all servers were successfully started correctly. In choosing PHP---PHP setting--short open tag Click, which will be useful later.
2, after wampserver all normal start success, we need to test Apache, open the browser, in the Address bar entered http://localhost/enter the browser interface as follows:
3, Xdebug configuration: Because the Wampserver has already brought the xdebug, all of us do not have to install again, just need simple configuration. The only thing to match is to open the D:\ProgramFiles2\wamp\wamp\bin\apache\Apache2.4.4\bin (this path is based on your own installation path) under PHP.ini, Find xdebug.remote_enable = off in the last few lines and change to xdebug.remote_enable = on. This is done to allow you to enter breakpoints when debugging in Eclipse.
Click the Phpinfo () link in http://localhost/, and if you have the following information in it, Xdebug is installed correctly:
4, configure eclipse: first need to configure Eclipse workspace This must be set to the Wamp www directory, otherwise you will not be able to debug. My www directory is D:\ProgramFiles2\wamp\wamp\www.
5, install the PHP plugin. Run Eclipse and find the "instal New Software" under Help in the main interface. Then select "All Available Sites" in work with. Due to search, it is necessary to wait patiently, and finally:
6, select Web development-related software, in which to find PHP development Tools (PDT) software. Tick and click Next.
Find PHP Development Tools (PDT) from the Web.xml,java EE and OSGI options.
7. Click Finish to complete the installation of PHP.
8. Click Yes to restart Eclipse.
9, enter into the preferences can see PHP. (If this is not successful, you can download the standard version of the official Eclipse and install the PHP plugin.) )
10, configure the workspace after you can start eclipse, into eclipse-> window-> preferences-> php set PHP executable, set the interface as follows:
After clicking the Add button, fill in the following information in the box that pops up:
In the name of your current PHP version of the line, executable path is to fill in your PHP environment php.exe files path, php INI file is to fill in your PHP environment php.ini file path, SAPI type select clt,php Debugger Select Xdebug, then click OK.
11. Configure PHP Server: Configure the interface as follows:
12. Configure Debug. Configuration information such as:
13. After the configuration is successful, restart the Wampserver and start all service "Start all services", create a new PHP project in Eclipse, create a new PHP page, such as:
14. After saving the code in the project, right-click on the project name in the pop-up action list menu, select Run as---Run Configurations panel and tap the Run button. Such as:
15, after the project started successfully open the browser, in the address bar input http://localhost/mytest/mytest.php If the interface below how to indicate the environment configuration success: