Hi i need the codeigniter encryption library encryption key to set form external file because i dont want this to set in config.php file because of security.
$config['encryption_key'] = 'my_key';
You can use Loading custom config file :-
After create custom config file we need to load it get it’s items. for load custom config we have two ways.
Manual loading :- we can manual load config file in controller/model like
$this->config->load('file_name'); //or use custom_config instead of file_name
where “file_name” is your custom config file name without .php extension.
Autoloading :- for auto load config file go to “application/config/autoload.php” and add code in $autoload[‘config’]
$autoload['config'] = array('config_custom'); //where config_custom is your file name.