In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to build an Eclipse-based PHP development environment under Windows". In daily operation, I believe many people have doubts about how to build an Eclipse-based PHP development environment under Windows. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to build an Eclipse-based PHP development environment under Windows". Next, please follow the editor to study!
Before configuring Eclipse, you first need a basic environment for Apache+PHP, which can install wampp or php home, both of which are integrated and convenient. It is recommended to install wampp2.2 and integrate Apache,MySQL,Perl,PHP. And unzipped is available.
Next I will take the installation of wampp2.2 as an example to explain step by step how to configure the Eclipse-based PHP development environment.
1. Install and configure wampp2.2
Configure wampp in this example, we unzip the downloaded wampp-2.2.zip to c:wampp2, and you can follow this example. The extracted directory structure should look like the following figure
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 million 10 dev
+ mod_ssl 2.0.46
+ mod_auth_mysql
(only experimental)
+ openssl 0.9.7b
And it's all configured, and there's not much we need to modify. * the DocumentRoot of Apache should be changed, which is the root directory of the Web service. Here we set it to F:workspace, and the working directory of Eclipse will be set to this location later. The rest can be configured according to your own needs.
Install Apache to serve the system
In this example, install Apache as service, enter the directory C:wampp2apache, and double-click apache_installservice.bat to install Apache as the service of the system.
Open the "Control Panel" in the "management tools", find the "service", you will see some of these Apache2, double-click, open the "Apache2 properties", set the "startup type" to "manual", this can save system resources, speed up the boot speed, is my personal habit problem, can not be changed, boot automatically start Apache can also.
Apache has not been started yet, let's not start it for the time being.
Download and install Eclipse
To choose to download Eclipse version 2.1.x, Eclipse needs jre support, so if jre is not already installed on the machine, download one as soon as possible.
Download the Eclipse package and decompress it directly. I unzip it to c:Eclipse, then go to the directory, double-click Eclipse.exe. If the startup prompt requires JRE support, it means you don't have JRE installed, or you haven't found the JRE path. In this case, just right-click on "my computer", select "Properties", in "Advanced" there is an item of "environment variables", find the item of "Path". Just add the path to JRE later. If you are afraid of trouble, you can also copy JRE to c:Eclipse directly.
Now that Eclipse is working properly, turn it off and move on to the next step, installing the plug-in for PHP.
Download and install the plug-in for PHP in Eclipse
After the download is complete, unzip it, and then copy all the extracted folders to the plugins directory of the Eclipse home directory. At this point, even if the PHP plug-in in Eclipse is good, we can create a new Project for PHP in Eclipse, and support the syntax highlighting of php, etc., open it quickly.
Create a new PHP project:
* * step: File-> New-> Project. See if you have PHP Project.
Step 2: set the project name, set the project directory below, and under the directory set by the DocumentRoot of Apache above, it can be accessed through the browser to facilitate debugging. For example, the path shown in the following figure, the browser corresponds to using http://localhost/iTrootCMS/
Then finish, create it.
Create a new file, write a few lines of code, and see how it goes. It worked well.
But this is far from enough, we need to continue to configure some more content.
Configure the PHP plug-in
Under the windows menu of Eclipse, select Preferences, then find PHP on the left, and select, the configuration parameters that come out are mainly Apache and MySQL, fill in according to your own situation, if you do so according to the article I wrote, then your configuration should be the same as the figure below, where you are set to run Apache in the background instead of running with services, so if you have set Apache to run with services, you can ignore it here.
There is also a built-in help system that needs to use php's official chm file, which can be downloaded here: http://www.php.net/download-docs.php, copy to c:wampp2phpphp_manual_en.chm, and the path can also be set in the configuration options just now.
I just talked about configuring Apache to run in the background in ecilpse. In the Window menu of ecilpse, select the Customize Perspective item, and then expand Other. There is an item of "PHP/Apache" in it. Check it and make sure that the tool button to start Apache and MySQL appears, as shown in the following figure.
In addition, you need to configure a plug-in for PHP SQL. Under the Window menu, Preferences has a PHP SQL entry, and the connecting item under it fills in the correct location of MySQL's JDBC driver. You can download * version: http://www.mysql.com/downloads/api-jdbc-stable.html here.
Then you can use Database bookmarks and other MySQL database functions, the following figure is to demonstrate the main database functions, the row is very full, in fact, they can be easily hidden.
At this point, the study on "how to build an Eclipse-based PHP development environment under Windows" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.