Welcome Guest, Not a member yet? Register   Sign In
constants and custom config settings
#7

[eluser]rizkhan[/eluser]
[quote author="InsiteFX" date="1302181063"]1) place your config file in application/config/filename.php
2) for constants you can add them to application/config/constants.php

The constants file will be autoloaded by CodeIgniter.

To load your config file to as toopay has stated above.

InsiteFX[/quote]

I have created a database_tables.php in config folder which contains constants for all database table names and loaded this file in controller class

$this->config->load('database_tables');

but when i try to access in model class for my db query table name then it shows me error

An Error Was Encountered

Your application/config/database_tables.php file does not appear to contain a valid configuration array.

for constant do we need to declare an array for constant?

thanks for your help


Messages In This Thread
constants and custom config settings - by El Forum - 04-06-2011, 05:54 PM
constants and custom config settings - by El Forum - 04-07-2011, 12:39 AM
constants and custom config settings - by El Forum - 04-07-2011, 01:57 AM
constants and custom config settings - by El Forum - 04-07-2011, 06:10 PM
constants and custom config settings - by El Forum - 04-07-2011, 11:13 PM
constants and custom config settings - by El Forum - 04-08-2011, 07:19 PM
constants and custom config settings - by El Forum - 04-09-2011, 01:07 AM
constants and custom config settings - by El Forum - 04-09-2011, 08:05 AM
constants and custom config settings - by El Forum - 04-19-2011, 08:18 AM
constants and custom config settings - by El Forum - 04-19-2011, 08:26 AM
constants and custom config settings - by El Forum - 04-21-2011, 04:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB