Welcome Guest, Not a member yet? Register   Sign In
Multiple Code Igniter Config Folders
#1

[eluser]adamfairholm[/eluser]
I've seen variations on this in different places around the site, but none to my knowledge in this setup - in theory it should work, but for some reason it doesn't like me. Any help in pointing out my logical flaw would be much appreciated!

So I have a server with server domains, and they are several sites that I'd like to run off one application. However, since they are different sites, they should each have their own config folder (not just file, since they each have some custom config files of their own).

I have my folder structure set up like this:

Code:
-system
-application
--config
---mysite1
----all the config files
---mysite2
----all the config files
-mysite1.com
--css
--img
--index.php
-mysite2.com
--css
--img
--index.php

In each index.php file I have the absolute paths to the application and system folder, and then I have this:

Code:
$config_individual_folder = "/**my_serverpath**/application/config/mysite1";

define('CFPB', $config_individual_folder.'/');

In system/codeigniter/CodeIgniter I have replaced

Code:
require(APPPATH.'config/constants'.EXT);

with

Code:
require(CFPB.'constants'.EXT);

and in system/libraries/Config.php I changed:

Code:
if ( ! file_exists(APPATH.'config/'.$file.EXT))
        {
            if ($fail_gracefully === TRUE)
            {
                return FALSE;
            }
            show_error('The configuration file '.$file.EXT.' does not exist.');
        }
            
        include(APPATH.'config/'.$file.EXT);


Code:
if ( ! file_exists(CFPB.$file.EXT))
        {
            if ($fail_gracefully === TRUE)
            {
                return FALSE;
            }
            show_error('The configuration file '.$file.EXT.' does not exist.');
        }
            
        include(CFPB.$file.EXT);

As far as I can tell and from what I've read around on the threads in bits in pieces of what I'm trying to do, this should work, but I only get a blank screen.

Is there some flaw in my reasoning here?


Messages In This Thread
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 07:37 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 08:26 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 08:42 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 08:57 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 09:10 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 10:29 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 10:42 PM
Multiple Code Igniter Config Folders - by El Forum - 07-28-2008, 11:06 PM
Multiple Code Igniter Config Folders - by El Forum - 12-14-2010, 08:39 PM
Multiple Code Igniter Config Folders - by El Forum - 12-14-2010, 09:03 PM
Multiple Code Igniter Config Folders - by El Forum - 12-14-2010, 09:23 PM
Multiple Code Igniter Config Folders - by El Forum - 01-24-2011, 05:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB