CodeIgniter Forums

Full Version: Common folder between projects for extended libraries and helpers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Klaurus[/eluser]
I am wondering... There is a way to put all my extended libs and helpers in a shared folder so I can access they from different projects?

El Forum

[eluser]Klaurus[/eluser]
Bump!

El Forum

[eluser]NotDior[/eluser]
If I'm understanding correctly, yes you can do this. I've got many sites running off of one instance of CI.

Basically you'll want to put your system folder into a location that all of your sites can get access to. From there you'll just change your index.php to refer to your common instance of the system folder . For instance install CI system folder to: /usr/local/share/php/codeIgniter2-1/system/ and refer to that location in your index.php. You can still have your application code in the site directory if you want to keep that seperate. In that instance: /home/USERNAME/codeIgniter/application/config etc etc.

In the Index.php file you'd set $system_folder = "/usr/local/share/php/codeIgniter2-1/system" and you'd set $application_folder = "/home/USERNAME/codeIgniter/application"

Hope that helps.