Reputation: 408
I am new to php. I was reading a book and created a sample project using the zend framework. My app is in C:\apache\htdocs\mysite.com\
I want to add this to eclipse project explorer. I dont see an option to open existing project in eclipse. How can I do this?
Also after I have added the project do I need to add the library directory from zend framework somewhere in my project references so that eclipse knows to include this?
Would eclipse intellisense pick up the new library or do I need to add a plugin?
Thanks, Kunal
Upvotes: 2
Views: 5127
Reputation: 6411
* screenshots are provided below
File > New > Project... screenshot-1
Select "PHP / PHP Project" > Next [screenshot-2]
Select "Create project at existing location (from existing source)" -- add the directory of your project. i.e. select "Browse..." and browse to the folder where your project is (e.g. in your case the directory is "C:\apache\htdocs\mysite.com\") [screenshot-3]
Select "Finish" your done.
See these stackoverflow questions.
Also see this stackoverflow question on the difference between the build path and the include path.
screenshot-1
screenshot-2
screenshot-3
Upvotes: 7
Reputation: 3128
Your personal project structure (including your web server) and project structures in Eclipse are independent structures. Eclipse has no way of knowing what your "personal" projects are.
You should have PDT installed in Eclipse and then in Project Explorer create New->PHP Project. In contents you will have to select "Create project at existing location (from existing source)" where you can select your project's folder.
Follow the wizard in case you have to add libraries, this can be a little tricky if they are outside the project.
Upvotes: 0