[eluser]Genki1[/eluser]
Hi folks,
How to set config values on
startup using a
function? I want to use the result of a function to initialize values that will be available throughout the application.
I tried this in config/config.php:
Code:
$config['my_variable'] = my_function();
. Result: "Call to undefined function my_function()"
I also tried using the CI feature $ASSIGN_TO_CONFIG (as described in index.php, CI v2.0.2):
Code:
$assign_to_config['my_variable'] = my_function();
. Result: "Call to undefined function my_function() in index.php"
I know that the function exists and functions properly because I use it in my controllers and models.
Any suggestions?