Welcome Guest, Not a member yet? Register   Sign In
CI files
#1

[eluser]Gerep[/eluser]
Hi,

I'm developing my website and 2 systems with CI.

The website and each system have different configurations.

Is it possible for me to use the same CI system folder for all applications? I'd like to keep these files (system) in a different address and access it from another address so I don't have to copy and paste the same thing for each project.

Thanks in advance.

*I apologize for my poor English.
#2

[eluser]jrtashjian[/eluser]
I believe this is possible if both sites are on the same server. Just make sure the path in $system_folder var in index.php is the absolute server path to where you want the CodeIgniter system folder to be.
#3

[eluser]tonanbarbarian[/eluser]
i generally put my ci system folder somewhere all my sites can access
i.e. /usr/share/CodeIgniter_1.7.2/system
then in the index.php you set the correct location and it should work fine

this also allows me to have a central location with multiple version of CI if I need to, i.e. if one site was build with 1.6.3 and has not been updated or tested on newer version I can have that version of CI available as well.
#4

[eluser]Gerep[/eluser]
I'll put my CI System folder in, i.e. /usr/share/CodeIgniter_1.7.2/system and the index.php i'll put in my new project folder along with application folder?

Is that it?
#5

[eluser]tonanbarbarian[/eluser]
i actually split things up in 3 ways

1. ci system files, /usr/share/CodeIgniter_1.7.2/system

2. application files
these i put outside the web root
/var/www/myapplication

3. index.php, images, css and js all go in the web root
/var/www/html/index.php

Now of course you need to adjust that to the location of your web root etc
This split is useful if you have multiple user accounts with separate webroots
i.e. /home/myuser/public_html
in that case I would put the applications in
/home/myuser/apps/myapplication
and the index.php etc is in /home/myuser/public_html

This separation gives you extra security because most of the code files are not in the webroot and cannot be accessed or modified if someone gains access to the server via php
#6

[eluser]smilie[/eluser]
I agree with tonanbarbarian.

My construction is as follows:

CI core files:
/var/www/ci_core

website application files:
/var/www/websitename/application

website root:
/var/www/websitename/www

Ofcourse, Apache root is at /var/www/websitename/www so all other files are unreachable by 'user'.

Cheers,
Smilie
#7

[eluser]Gerep[/eluser]
Thank you guys...it helped a lot!




Theme © iAndrew 2016 - Forum software by © MyBB