3

could i use one codeigniter framework directory to create multiple applications?

cause it seems that i have to have separate codeigniter folder instances for different applications. i want to be able to adjust some code in one place (classes that are universal) and every application i created with codeigniter will be affected.

with yii you could do this.

2

3 Answers 3

6

you can do this folder structure:

system
website-1 (your application)
----application
----index.php
website-2  (your application)
----application
----index.php
website-3  (your application)
----application
----index.php

move the 'codeigniter application folder' from the system and put it in one of you application folders.

copy the index.php file and paste inside your application folder.

In the index.php file:

YOu should have the following:

$system_folder = "../system";
$application_folder = "application";
Sign up to request clarification or add additional context in comments.

Comments

6

Both Colin and Thorpe are correct.

Out of the box, sharing is not perfect. If you want to share libraries you have to put them in the system/libraries folder which makes upgrading that little bit more difficult and models cannot be shared at all.

To created a "shared" directory for libraries and models then you can use this MY_Loader.

Comments

2

could i use one codeigniter framework directory to create multiple applications?

Yes, you can create multiple applications with one CodeIgniter instance

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.