This article will talk about how to run php code in eclipse, and introduce the method of configuring the php environment in eclipse. I hope it will be helpful to everyone.
eclipse is a very easy-to-use development tool. Although everyone always thinks that it is used to develop Java, as long as you download its prepared plug-ins, it can be used in other languages. It can also be developed. Let’s take a look.
Prerequisite: Download and install a basic version of Eclipse
Open: https://www.eclipse.org/downloads/ Find: Eclipse IDE for Java EE Developers , and then select the version corresponding to the operating system.
Configure and write php in eclipse
Install the Eclipse PHP development environment (PDT)
Download address: http://www.eclipse.org/pdt/index.html
Steps: In Eclipse, menu: Help -> Install New Software In work with, enter the installation source: http://download .eclipse.org/tools/pdt/updates/3.7
Just restart after the installation is complete.
Create a new PHP project
Use XAMPP
I directly Changed the path
Yesterday when I built it, it was normal to access the one that comes with xampp/htdocs, but I changed it to my root. The directory is 403
The reason is that the default user group of apache is deamon, which needs to be modified to the user name of your own mac. Also in the httpd.conf file, user daemon is changed to user yourname
Okay, it’s out. certainly:
The above is the detailed content of Detailed explanation of how to configure the php environment and run php code in eclipse. For more information, please follow other related articles on the PHP Chinese website!