Eclipse phpeclipse Configuration

Source: Internet
Author: User

Recently I have been in the mood to read PHP books while I have some time.
Speaking of PHP will have to mention the development environment of PHP, the general is to use Apache server, MySQL database, plus PHP into a complete operating environment, but it seems that there is no code to write the compiler ah, has been using the Notepad script PHP code can not, Later I heard that eclipse can also be used to develop PHP, just a PHP plugin-"PHPEclipse". In short, PHPEclipse is an eclipse plugin that provides PHP developers with an integrated development environment. The specific introduction please crossing Net: http://www.phpeclipse.com/

Here are the steps to install, set up, and use phpeclipse under Eclipse:

First, install the good apache+mysql+php+eclipse
Originally the installation here is not the focus of this article, but I still want to say a word here, apache+mysql+php if it is a single step to install the final configuration is too complex, here is recommended an integrated installation package "XAMPP", Xampp contains Apache, MySQL and PHP, and after installation no need to set other things separately, it is convenient, highly recommended.
Second, download PHPEclipse
Here you can download the Binarry version of PHPEclipse (Http://sourceforge.net/projects/phpeclipse/?source=typ_redirect)
Third, installation PHPEclipse
Copy all the contents of the features folder extracted from the downloaded archive to the features folder in the Eclipse root directory, such as copy to: D:eclipse\features (where Eclipse installs, go to find features). Similarly, copy everything under the Plugins folder in the package to the Plugins folder in the Eclipse root directory. Copy the site.xml from the compressed package to the root directory of Eclipse.
Iv. Configuration PHPEclipse
1. Restart Eclipse.
2. Open Eclipse, choose Window->open perspective->other ...
<ignore_js_op>

3. In the Open Perspective window, find the Select PHP option
<ignore_js_op>

4. At this point, you can see the PHP tab in the top right of Eclipse, so you can switch between Java, Debug, PHP mode
<ignore_js_op>

5. In Eclipse, select Window->preferences, and in the pop-up Preferences window, click phpeclipse->php External Tools from the left menu bar to modify the PHP configuration information. PHP External Tools Three submenu: Apache, MySQL, XAMPP, to set up Apache, MySQL, XAMPP configuration information.

<ignore_js_op>

6. Click the Apache submenu to modify the Apache configuration information. Modify the Apache path to a native installation path. Modify the sample, the specific value of their own computer-based.
<ignore_js_op>

7. Modify MySQL configuration information
<ignore_js_op>

8. Modify XAMPP configuration information
<ignore_js_op>

V. Use of PHPEclipse
1. Switch eclipse to PHP view and select File->new->php Project to create a new PHP project. Enter the project name (project name) in the New Phpproject window, select the project save location, and click Finish.
<ignore_js_op>


2. Select the Hello World project you just created, right-click and select New->php File from the popup shortcut menu.
<ignore_js_op>

3. In the new window that pops up, enter the PHP file name, such as index.php, and then next
<ignore_js_op>

4. Write the following code on the index.php page:

    1. <?php
    2. Print "Hello world!";
    3. ?>
Copy Code





5. Modify the Apache file access path: Change the DocumentRoot and directory values in the httpd.conf file under xampp\apache\conf to the workspace path for Eclipse.
<ignore_js_op>

6. Select the Hello World project, right-click, and select the Properties option from the popup menu. In the left menu bar of the Properties window that pops up, select PHP Properties Settings, and modify the value of the project URI. The default value is http://localhost/, and the project name is added later. This will allow you to navigate to the project normally when you run the PHP file.
<ignore_js_op>

7. Click the Start Xampp icon to start the XAMPP
<ignore_js_op>

8, run PHP file: here to Hello world\index.php for example, select index.php, right-click, select Open PHP Browser, you can see index.php in the browser run effect
<ignore_js_op>

Southeast.jpg (10.68 KB, download number: 0)

Download attachments to albums

2014-9-30 10:08 Upload



9, good luck!

Eclipse phpeclipse Configuration

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.