Working with Eclipse and Code Igniter

eclipsecodeigniter_ideTill recently I had been using my trusted editor, Notepad++, for doing all my development work. Not that I am not using it anymore, but I was looking for something more powerful and integrated, something like an IDE. I had tried few IDEs including Eclipse before but did not get much into it and hence left it there. I picked up Eclipse again and tried to give it one more try. I also tried out Aptana which is another awesome IDE built on Eclipse with all the web development tools you need built into it out-of-box (PHP, Ruby, jQuery, Python).

So, I started with downloading PHP Development Tools Project version of Eclipse (Eclipse PDT) as I was primarily going to use it for PHP development. Its a huge zip file but good thing is no need to install it, just unzip and run the exe. After setting up the initial workspace, PHP settings etc., we can start adding our projects and get onto development work.

Currently, the project I am working on is built using Code Igniter and was looking to develop using Eclipse. Adding a project was pretty straight forward but getting the auto completion to work was an issue. However, there is a workaround to get it all working.

First, we need to move the application folder out of the system folder and bring it up one level next to the system folder. So, it looks something like this :


Now, edit the index.php file in the root folder and change the following line :

$application_folder = "application";


$application_folder = "../application";


eclipsecodeigniter_projectsviewNow, we can add the system and application folders as Eclipse project. First create a new project and name it something like “CI_CORE” which points to the system folder. Similarly, add another project “CI_APP” which points to the application folder. It should look something like the following image. Once, CI_APP is added, right click and modify the properties. Select PHP Include Path and add “CI_CORE” under Projects. And it’s done.

Now, to test out whether the auto completion feature works or not, create a new controller (news.php in my example) and add constructor method. Add any method and press Ctrl + Space to bring the auto completion window like the following image.


Happy Coding!!!

About these ads


  1. is there any tutorial about this?? i downloaded already eclipse+pdt..but i dont know how to integrate with CodeIgniter.. im using XAMPP and Dreamweaver CS3..want to learn new things..please post it …

    1. Kahtrina,
      You need to download and unzip CodeIgniter code in the XAMPP htdocs folder. That is the document root from where your site will be served. Once that is done, you need to follow the post above and it should work.

      1. i have already put my Codeigniter in the XAMPP htdocs. What i don’t know is how can i make it run with eclipse + pdt?? is there any configuration i needed??

  2. Thanks a lot.
    How you setup debugger in Eclipse PDT for CodeIgniter?
    I hope you can help me. Thanks in advance

    I use XAMPP and my Zend Debugger works in my non-codeigniter applications. I have learned CodeIgniter for ten days.

  3. i know how codeigniter works in XAMPP.. how can i code my codeigniter project using eclipse + pdt as my editor like dreamweaver cs3? that’s what i want to learn.. can you post tutorial bout that?? thanks in advance.. :-)

  4. Hi, I just followed you method. It works anyway, but the auto completion doesn’t work. Do I need change the debugger ? Thanks.

    1. I did not change the debugger. If everything is setup correctly, the auto completion works fine. Try it and let me know.

  5. Thanks, I’ve been stuck in doing my final-project. This is really helpful. I think the point is in pointing application folder and system folder. :)

  6. Hello:)
    I have a problem.Actually, I got the same structure CI_CORE,CI_APP,and select the include path as well. But the feature of auto-complement still no happens.
    Does it need more configuration?

  7. Hi! Nice tip! …

    but… I’ve followed your instructions and I can’t get the autocomplete only for ‘load’ (and ‘view’) when $this->load…

    I have the PHP Eclipse + PDT Edition and CI 1.7.2

    “No completions available” :( … How can I fix this?


    sorry for my english :P

    1. Benita,
      When you create a new project, the wizard should ask you where it should point to. Name it as CI_CORE and point that to the system folder.

  8. Hey friends,
    I’m new to eclipse and codeigniter can any one plz explain how to use eclipse to develop in code igniter folder ?
    do i have to copy system folder from codeigniter into every project i create ?

  9. Thank you a bunch for sharing this with all of us you really know what you’re speaking about! Bookmarked. Please additionally consult with my site =). We could have a hyperlink exchange contract among us

  10. You are so awesome! I don’t believe I’ve read anything like this before.
    So great to find someone with a few genuine thoughts
    on this subject matter. Really.. thank you for starting this
    up. This website is one thing that is needed on the web, someone
    with a little originality!

  11. Undeniably believe that which you stated.

    Your favorite reason appeared to be on the internet the easiest thing to be aware of.
    I say to you, I definitely get annoyed while people consider worries that they just
    don’t know about. You managed to hit the nail upon the top and also defined
    out the whole thing without having side effect , people could take a signal.

    Will probably be back to get more. Thanks

  12. Can I simply just say what a comfort to uncover a person that truly knows what they are talking about online.
    You actually understand how to bring a problem to light and make it important.

    A lot more people have to check this out and understand this
    side of the story. It’s surprising you’re not more popular given that
    you certainly have the gift.

  13. Be authentic, sincere, and use true stories whenever possible to make your points.
    Often it can be known as both a help and also a hinderence
    towards the high echelons of gradual service sector firms, that happen to be yet to develop comfortable
    with it has the disombobulating character. With it now everyone can have all the gold and cash they wish for
    those expensive upgrades, and to be competitive in this amazing new game called
    – CSR Classics.

  14. First off I would like to say terrific blog! I had
    a quick question that I’d like to ask if you do not mind.
    I was curious to know how you center yourself and clear your head prior to
    writing. I’ve had difficulty clearing my mind in getting my thoughts out.

    I truly do take pleasure in writing but it just seems like the first 10 to 15
    minutes are generally wasted just trying to figure out how to begin.
    Any suggestions or tips? Cheers!

  15. If you were an unfortunate auto accident victim, the last
    thing you want to do is spend your time fighting with attorneys, insurance companies or the other driver.
    When such situation happened on the road or
    even in your working area, then you can make a personal injury
    claim or car accident claim. Failing to follow can lead you
    to heaps of troubles.

  16. I think this is one of the most important info for me. And
    i am glad reading your article. But should remark on few general things, The site style is great, the articles is really
    great : D. Good job, cheers

  17. May I simply say what a relief to uncover someone that genuinely understands
    what they are discussing on the net. You actually know how to bring a problem
    to light and make it important. More and more people
    must look at this and understand this side of the story.
    I was surprised that you aren’t more popular since you definitely have the gift.

  18. Great post. I was checking constantly this blog and I’m impressed!
    Very helpful information particularly the last part :) I care for such information a lot. I was seeking this particular information for a very long time.

    Thank you and good luck.

  19. This is really interesting, You’re a very skilled blogger.

    I have joined your feed and look forward to seeking more of
    your magnificent post. Also, I have shared your site in my social networks!

  20. I don’t even know the way I ended up right here, but I assumed this post used to be
    good. I don’t recognise who you might be but definitely you’re going
    to a well-known blogger when you aren’t already. Cheers!

  21. If you are facing a charge of drunk driving then you
    should consult with a qualified lawyer that help to you in reduced the charge or
    going out. None of that eliminates the question of Fifth Amendment protection from self-incrimination. Pennsylvania DUI law requires additional penalties to be imposed upon DUI suspects who refuse to submit to chemical test analysis.

  22. Also the deductibles, co-pays and caps on coverage
    will vary widely. With pet insurance, there is the knowledge that you will be getting some or
    even most of the cost of the vet visit back. The reason I
    have told this story is to highlight the very
    important fact that Insurance for your Dog is an absolute must
    and priority.

  23. Unless there areextraditing circumstances divorce can only be granted to these who have been legally married for a minimal of a few many
    years. The occurrence of a major accident incorporates lots of financial obligations due
    to the compensation, as well as the medical charges that comes with
    it. The following are some of the things that a skilled attorney should
    be able to do for you:Ask several lawyers if they can do
    these things for your complaint.

  24. Hello there, just became alert to your blog through Google,
    and found that it is truly informative. I am going to watch out
    for brussels. I will be grateful if you continue this in future.
    Numerous people will be benefited from your writing. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s