从插件的配置文件访问CI的配置文件

I am trying to centralize all deployment specific changes into CI's main config file and then have "lesser" config files (like a plugin's) read it from here.

In this specific instance:

I have CKEditor/CKFinder as plugins to my Codeigniter app. I would like to read values from CI's main config file from CKFinder's config file so that I can get at the baseURL.

In order to tell CKFinder where to look for images, you need to specify a baseURL in its config.php file. I would rather it read the baseURL from my main config file and append an image directory to this instead of modifying CKFinder's file directly.

I tried the following in CKFinder's config.php file to no avail:

$baseUrl=$this->$config['base_url'].'assets/my_images/';

Please lead me to the light!

Mmiz

if you wanna read base_url you can do something like this:

$baseUrl = base_url().'assets/my_images/';

Instead if you wanna reach a config-item, you can do this.

$this->config->item('your_constant'); 

and in the config file something like:

$config['your_constant'] = "your string"; 

You can use site_url which was intended to be an extension of base_url but for relative paths.

$baseUrl = site_url('/assets/my_images');