Welcome Guest, Not a member yet? Register   Sign In
System wide codeignighter ?
#1

[eluser]gordon Stewart[/eluser]
Hi,

I've been introduced to Codeignighter tonight, & doing some research (a question or 2 in the lounge area)...

Another question - below...


We currently have a main site in Perl / CGI..

I run a small section of the site, in PHP...


If we add Codeignighter to the website / server, (in a global - access / directory) - can We access it from my area f the site, & selected areas of the site (in future)...

OR, will we be installing it in JUST my area of the site (rest of the site is in Perl)

- what happens in future - If we do want another area in PHP? do we re-add codeignighter in that area too (2 installs ?)
#2

[eluser]kirkaracha[/eluser]
If you install CodeIgniter outside your web root you can put index.php files in any directory on your site and use htaccess files to have CI handle those directories.
#3

[eluser]ascotan[/eluser]
In theory nothing but the index.php file needs to be under the docroot. I've restructured my install so that my /System folder and my /Applications folder reside in different places on the webserver with just the index.php file under the docroot.

The index.php file will be the front controller for your application. In the index.php file you will define the URL path that the index.php file will reside on. You will also point to where you put the /System folder and where your application code resides. This gives you a very configurable setup.

If someone else goes with PHP it should be a problem. Also as soon as the URL hits the index.php file PHP will be called to compile the server response even if the rest of the site is written in Perl.

Additionally I have multiple CI applications running on the same site using different front controller files. They both use the same /System folder but different application directories.
#4

[eluser]heavenquake[/eluser]
in index.php you can define where in the filesystem to look for the application/system folders.

I personally have system/ in /usr/share/codeigniter-1.7.2/ -- and then I have /usr/share/codeigniter/ being a symlink to the newest installed version of CI. Then I have the application-folder, which holds the site-specific code, in the docroot of the particular project.

Also, I have a folder called /usr/share/codeigniter-common/ which contains custom libraries I use on all my sites (templating, caching etc). I accomplish this with having a symlink folder for that folder called application/libraries/common in all of my projects. Then I load them with $this->load->library('common/template');

I am currently considering extending the Loader-class to automatically look in the common-folder if none is found in the local application, to eliminate the need for symlinks and streamline the load-syntax.




Theme © iAndrew 2016 - Forum software by © MyBB