Building a PHP development environment based on Eclipse under Windows

xiaoxiao2021-03-06  51

/ * Please keep posted topics: building under Windows PHP-based development environment of Eclipse-: z33 from: http: //www.pig8.org * / Before configuring Eclipse, Apache PHP first need a base environment, can be installed wampp Or PHP HOME, they are all integrated installations, more convenient, download address is as follows: Wampp2.2: [URL = http: //prdownloads.sourceforge.net/xampp/wampp-2.2.zip? Download] http: //prdownloads . Sourceforge.Net / XAMPP / W .... 2.zip?download[/url] PHP Home: [URL = http://prdownloads.sourceforge.net/phphphone/phphphotos f f] 2]: h: /prdownloads.sourceforge.net/phphone....2.zip?download [/ur] recommended Wampp2.2, integrated apache, mysql, perl, php. And unpacking, I will use it very convenient. Let's install Wamp2.2 as an example, step by step, how to configure the Eclipse-based PHP development environment. First, the installation configuration wampp2.2 • Configure WAMPP in this example, we extract the downloaded Wampp-2.2.zip, under the C: / Wampp2, and the comrades can follow the comments I have written. The decompressed directory structure should be shown below: [IMG: 1B89ABD35A] http://www.pig8.com/upload/1.png [/ IMG: 1B89ABD35A] WAMPP contains the following: apache 2.0.46 Mysql 4.0.13 php 4.3.2 Pear Perl 5.8.0 MOD_PHP 4.3.2 MOD_PERL 1.99_10 DEV MOD_SSL 2.0.46 MOD_AUTH_MYSQL (Only Experimental) OpenSSL 0.9.7B and it is already configured, need Let's modify the content, the first one should change the Apache DocumentRoot, which is the root directory of the web service. Here you set it to F: / Workspace, wait for the work directory of the Eclipse to set it to this location. Others can be configured separately according to their needs. · Installing Apache This example is installed for the Apache to Service, enters the directory C: / Wampp2 / Apache, double-click Apache_installService.bat to install Apache into the system's service. Open the Administrative Tools in the Control Panel, find some of the "service", you will see some, double click, open "Apache2 Properties", set the "Start Type" to "Manual", which saves the system Resources, speed up the speed of boot, is my personal habit, you can use it without remembering, boot automatically starting Apache. [IMG: 1B89ABD35A] http://www.pig8.com/upload/2.png [/ img: 1b89abd35a] Now Apache has not yet started, temporarily do not start it.

Second, download and install Eclipse download address: [URL = http: //download.eclipse.org/downloads/index.php] http://download.eclipse.org/downloads/index.php [/ url] To select Eclipse 2.1 .x version download, Eclipse requires JRE support, so if you have not installed JRE on the machine, you will download it, http://java.sun.com has JRE downloads. Download the Eclipse's compressed package directly to decompress it, I can extract it to c: / eclipse, then make this directory, double-click Eclipse.exe, if you start prompts you need JRE support, you don't have JRE, or Didn't find the JRE path, such, just right click on "My Computer", select "Properties", in "Advanced", "environment variable" one, find "path", in the back JRE's path plus it, if you are afraid, copy JRE directly to C: / Eclipse. Now Eclipse can run normally, OK, turn off it, continue the next step, install PHP plug-in. Third, download and install the PHP in the plugin address of Eclipse: http://sourceforge.net/project/showfiles.php? Group_id = 57621 & package_id = 53190 Download, decompressed, then copy the unfined folder to the Eclipse main directory Plugins directory. To this step, even if the PHP plugin in Eclipse is OK, we can create a new PHP project in Eclipse, and support the php syntax to brighten, open and take a look. New PHP item: Step 1: File -> New -> Project, see, there is PHP Project. [IMG: 1B89ABD35A] http://www.pig8.com/upload/3.png [/ img: 1b89abd35a] Step 2: Set the project name, the following sets item directory, need and the Apache's DocumentRoot in the above The settings are set below to access them through the browser to facilitate debugging. For example, the path shown below, the browser corresponds to http: // localhost / iTrootcms / [img: 1b89abd35a] http://www.pig8.com/upload/4.png [/ IMG: 1B89ABD35A] then Finish It is created. Create a new file, write a few lines of code, see how? Good effect. [IMG: 1B89ABD35A] http://www.pig8.com/upload/5.png [/ IMG: 1B89ABD35A] But this is still far less, we need to continue to configure more content.

转载请注明原文地址:https://www.9cbs.com/read-81713.html

New Post(0)