tags:

views:

28

answers:

1

I have my directory structure set up as follows:

-application --controllers --models --libraries --views --etc -library --codeigniter_1_7_2 --codeigniter_1_7_1 -public_html --images --scripts

This has worked well for me, and I like having the codeigniter "master" files off in their own library. A quick switch in the index.php file and I can swap between different versions.

One thing that I WANT to do is when using something from Zend (like the search/lucene class) is to put the Zend directory under the main "library" folder. It's recommended that it go in my application/libraries folder, but then often when I search for a piece of code in my application I get a huge set of results from the large Zend library that I have to scroll through. It also really doesn't belong there given how I've set up my directory structure.

My problem is that if I try and put zend in the /library folder, I have to use php's require_once (I assume) and then I get permission errors.

If the zend library is at /application/libraries/Zend, this works:

$this->load->library('zend', 'Zend/Search/Lucene'); $this->load->library('zend'); $this->zend->load('Zend/Search/Lucene');

If the zend library is at /library/Zend this does NOT work: require_once('../library/Zend'); The directory route is correct there, I just get a "permission denied" error.

Has someone else had this problem or figured out a nice easy way to set up their external libraries similar to how I'd like to do it?

+1  A: 

Here's a starting point:

http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/

http://freakauth.4webby.com/tutorials/using-zend-framework-components-in-code-igniter

Matthew
Thanks, that got me pointed in the right direction. I used the description in the first link. I had to add a LIBPATH value to my index.php file, because my BASEPATH and APPPATH variables all started out too deep. But after I did that it was easy to set a reference to my library folder. Thanks again :)
neomech