Skip to content
Advertisement

Custom config file for codeigniter

Very new to CodeIgniter, trying to create a custom config file to load special variables into my application.

in application/config/ I created custom.php and placed the following code in that file:

JavaScript

I then opened up application/config/autoload and altered the following code:

JavaScript

I refresh my application and see this error:

JavaScript

I opened up some of the default config files and don’t see a configuration array? What am I doing wrong?

Advertisement

Answer

Use

JavaScript

instead of

JavaScript

For fetching config item

JavaScript

Where item_name is the $config array index you want to retrieve.

Docs : CodeIgniter User Guide 2.x CodeIgniter User Guide 3.x

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement