Welcome Guest, Not a member yet? Register   Sign In
Running Multiple Applications with one CodeIgniter Installation
#1

[eluser]khuzaimi[/eluser]
refer from http://ellislab.com/codeigniter/user-gui..._apps.html

if i running multiple application, how about folder config,controllers,views, etc... in my second application.

is it i must download another fresh folder config,controller,... or make by own using mkdir config.
#2

[eluser]xwero[/eluser]
just copy the application directory for multiple apps and rename them.
#3

[eluser]khuzaimi[/eluser]
in /var/www/codeigniter/index.php

if ($application_folder == '')
{
$application_folder = 'application/foo';
$application_folder = 'application/bar';
}

like that?
#4

[eluser]AgentPhoenix[/eluser]
Each application has to have it's own index.php file so to speak. In the case you gave, you'd duplicate index.php to foo.php and bar.php and then in each of those files, set the application folder for that particular application.
#5

[eluser]khuzaimi[/eluser]
system/application/foo/
system/application/foo/config/
system/application/foo/controllers/
system/application/foo/errors/
system/application/foo/libraries/
system/application/foo/models/
system/application/foo/views/
system/application/bar/
system/application/bar/config/
system/application/bar/controllers/
system/application/bar/errors/
system/application/bar/libraries/
system/application/bar/models/
system/application/bar/views/

that mean each application like foo and bar have foo.php and bar.php at the same level system/

it is possible to have index.php for foo and bar application
#6

[eluser]Randy Casburn[/eluser]
@khuzaimi -- can you describe what you want to achieve?

The basic idea then would be to call your 'foo' application with:

http://yoursite.com/foo.php

and call your 'bar' application with:

http://yoursite.com/bar.php

and you would set up a basic home page called index.php that would provide a menu to access either of these.

if you want more functionality there are other options. You can search the forums for 'HMVC' for other ways of setting up your applications too.

Hope this helps,

Randy




Theme © iAndrew 2016 - Forum software by © MyBB