Home php教程 php手册 Eclipse的PHP插件PHPEclipse安装和使用

Eclipse的PHP插件PHPEclipse安装和使用

Jun 06, 2016 pm 08:20 PM
use Install

PHP有很多相当不错的开发工具,如Zend Studio、NetBeans、phpdesigner等,但对于习惯Java编程的程序猿们来说,最常用的还要属Eclipse。那么Eclipse能用于PHP开发

PHPEclipse是Eclipse的一个插件,提供了包括PHP语法分析、运行、调试等功能的集成开发环境。它基于Eclipse的插件机制,即插即用,配置和使用都非常方便。如果平时需要同时进行Java和PHP的Web开发,PHPEclipse是个不错的选择。下面将详细介绍PHPEclipse的安装及相关配置(注意:之前已用XAMPP搭建起PHP环境)。

第一阶段:PHPEclipse安装

第1步:百度搜索PHPEclipse,点击“PHPEclipse”进入PHPEclipse的官方网页。

PHP学习之道:[4]PHPEclipse安装与使用

第2步:点击页面右侧的“Getting PHPEclipse>>Binary&Source>> 1.2.3 Binary Download”,跳转到PHPEclipse的下载页面,选择下载文件保存位置,开始下载。

PHP学习之道:[4]PHPEclipse安装与使用

 

第3步:此处下载的是PHPEclipse-1.2.3.200910091456PRD-bin.zip压缩文件,解压缩后,发现内容包括:两个文件夹features和plugins,一个xml文件site.xml。

PHP学习之道:[4]PHPEclipse安装与使用

第4步:将features和plugins中的内容复制到Eclipse的相应文件夹下,将site.xml复制到Eclipse的根目录即可。然后启动Eclipse(如果Eclipse已经启动,则重启Eclipse以使新添加的文件生效)。

第5步:如图所示,依次选择“Window>>Open Perspective>>Other…”,打开视图选择窗口。

PHP学习之道:[4]PHPEclipse安装与使用

第6步:在“Open Perspective”(视图选择)窗口中,找到“PHP”选项并双击,将在Eclipse中添加PHP视图。

PHP学习之道:[4]PHPEclipse安装与使用

第7步:添加成功后,会在Eclipse右上角看到“PHP”的视图选项,单击按钮即可将Eclipse切换到PHP视图。

 

PHP学习之道:[4]PHPEclipse安装与使用

第8步:在Eclipse中依次选择“Window>>Preferences”,在弹出的Preferences窗口的从左侧菜单栏中依次点击“PHPeclipse>>PHP External Tools”,修改PHP配置信息。同时,我们发现“PHP External Tools”下包含三个子菜单:Apache、MySQL、XAMPP,用于设置Apache、MySQL、XAMPP的配置信息。

 

PHP学习之道:[4]PHPEclipse安装与使用

第9步:点击“Apache”子菜单,修改Apache配置信息。将Apache路径修改为本机安装路径。修改样例如图所示,具体值以自己电脑为准。

PHP学习之道:[4]PHPEclipse安装与使用

第10步:修改MySQL配置信息,修改样例如图所示,具体值以自己电脑为准。

PHP学习之道:[4]PHPEclipse安装与使用

第11步:修改XAMPP配置信息,修改样例如图所示,具体值以自己电脑为准。修改完毕后点击“OK”保存修改内容。

PHP学习之道:[4]PHPEclipse安装与使用

第二阶段:PHPEclipse的基本使用方法

第1步:将Eclipse切换到PHP视图,依次选择“File>>New>>PHP Project”新建PHP工程。在“New PHPProject”窗口中输入工程名(Project name),选择工程保存位置(可以使用Eclipse默认工作空间”Use default location”,也可另行指定存储位置)。完成后点击“Finish”结束。

PHP学习之道:[4]PHPEclipse安装与使用

第2步:选中刚刚建立的Hello World工程,鼠标右键单击,在弹出的快捷菜单中选择“New>>PHP File”。

PHP学习之道:[4]PHPEclipse安装与使用

第3步:在弹出的新建窗口中,输入PHP文件名称,如index.php,然后点击“Finish”。

PHP学习之道:[4]PHPEclipse安装与使用

第4步:打开刚刚新建的index.php页面,在标签之间添加输出语句,如图所示。

PHP学习之道:[4]PHPEclipse安装与使用

第5步:用XAMPP安装的Apache默认的文件访问路径为“C:/xampp/htdocs”(盘符等以自己的配置为准)。要想在Eclipse中运行PHP文件,就要修改Apache的文件访问路径。具体做法是修改Apache\conf下的httpd.conf文件中的DocumentRoot和Directory值,将其改为Eclipse的工作空间路径。

PHP学习之道:[4]PHPEclipse安装与使用

第6步:选中Hello World工程,鼠标右键单击,在弹出的菜单中选择“Properties”选项。在弹出的Properties窗口的左侧菜单栏中选择“PHP Properties Settings”,修改Project URI的值。默认值为,在后面添加工程名。这样在运行PHP文件时才能够正常定位到该工程。

PHP学习之道:[4]PHPEclipse安装与使用

第7步:点击“Start XAMPP”图标,启动XAMPP。XAMPP会自动将Apache等组件启动。同理,关闭Apache等功能,点击“Stop XAMPP”图标。

PHP学习之道:[4]PHPEclipse安装与使用

第8步:运行PHP文件。这里以Hello World\index.php为例。选中index.php,右键单击,选择“Open PHP Browser”,就能看到index.php在浏览器中的运行效果了。

PHP学习之道:[4]PHPEclipse安装与使用

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? Mar 13, 2024 pm 10:22 PM

If you have successfully downloaded the installation file of Baidu Netdisk, but cannot install it normally, it may be that there is an error in the integrity of the software file or there is a problem with the residual files and registry entries. Let this site take care of it for users. Let’s introduce the analysis of the problem that Baidu Netdisk is successfully downloaded but cannot be installed. Analysis of the problem that Baidu Netdisk downloaded successfully but could not be installed 1. Check the integrity of the installation file: Make sure that the downloaded installation file is complete and not damaged. You can download it again, or try to download the installation file from another trusted source. 2. Turn off anti-virus software and firewall: Some anti-virus software or firewall programs may prevent the installation program from running properly. Try disabling or exiting the anti-virus software and firewall, then re-run the installation

How to download foobar2000? -How to use foobar2000 How to download foobar2000? -How to use foobar2000 Mar 18, 2024 am 10:58 AM

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

How to use NetEase Mailbox Master How to use NetEase Mailbox Master Mar 27, 2024 pm 05:32 PM

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below

How to use Baidu Netdisk app How to use Baidu Netdisk app Mar 27, 2024 pm 06:46 PM

Cloud storage has become an indispensable part of our daily life and work nowadays. As one of the leading cloud storage services in China, Baidu Netdisk has won the favor of a large number of users with its powerful storage functions, efficient transmission speed and convenient operation experience. And whether you want to back up important files, share information, watch videos online, or listen to music, Baidu Cloud Disk can meet your needs. However, many users may not understand the specific use method of Baidu Netdisk app, so this tutorial will introduce in detail how to use Baidu Netdisk app. Users who are still confused can follow this article to learn more. ! How to use Baidu Cloud Network Disk: 1. Installation First, when downloading and installing Baidu Cloud software, please select the custom installation option.

How to install Android apps on Linux? How to install Android apps on Linux? Mar 19, 2024 am 11:15 AM

Installing Android applications on Linux has always been a concern for many users. Especially for Linux users who like to use Android applications, it is very important to master how to install Android applications on Linux systems. Although running Android applications directly on Linux is not as simple as on the Android platform, by using emulators or third-party tools, we can still happily enjoy Android applications on Linux. The following will introduce how to install Android applications on Linux systems.

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? Apr 26, 2024 am 09:40 AM

MetaMask (also called Little Fox Wallet in Chinese) is a free and well-received encryption wallet software. Currently, BTCC supports binding to the MetaMask wallet. After binding, you can use the MetaMask wallet to quickly log in, store value, buy coins, etc., and you can also get 20 USDT trial bonus for the first time binding. In the BTCCMetaMask wallet tutorial, we will introduce in detail how to register and use MetaMask, and how to bind and use the Little Fox wallet in BTCC. What is MetaMask wallet? With over 30 million users, MetaMask Little Fox Wallet is one of the most popular cryptocurrency wallets today. It is free to use and can be installed on the network as an extension

How to install Podman on Ubuntu 24.04 How to install Podman on Ubuntu 24.04 Mar 22, 2024 am 11:26 AM

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple

See all articles