Kunal Ranglani
Kunal Ranglani

Reputation: 408

adding existing zend framework directory to eclipse

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

Answers (2)

Gerard Roche
Gerard Roche

Reputation: 6411

Create new project from existing source

* screenshots are provided below

  1. File > New > Project... screenshot-1

  2. Select "PHP / PHP Project" > Next [screenshot-2]

  3. 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]

  4. Select "Finish" your done.

Add Zend Framework for code completion

See these stackoverflow questions.

Also see this stackoverflow question on the difference between the build path and the include path.

Screenshots

screenshot-1

enter image description here

screenshot-2

enter image description here

screenshot-3

enter image description here

Upvotes: 7

Adrian World
Adrian World

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

Related Questions