[eluser]skunkbad[/eluser]
I'm trying to create multiple configuration options in a config file:
Code:
$config['image_configuration'] = array(
'upload_dir' => 'uploads',
'acceptable_files' => 'gif|jpg|jpeg|png',
'max_kb' => '200',
'max_width' => '1024',
'max_height' => '768'
);
$config['file_configuration'] = array(
'upload_dir' => 'uploads',
'acceptable_files' => 'doc|pdf',
'max_kb' => '200',
);
In the controller, I'm trying to merge these settings with settings that only apply to the current need:
Code:
// Configure Upload class
$local_config['upload_path'] = './' . $upload_dir . '/' . $primary_dir . '/' . $secondary_dir . '/';
$config = array_merge( $local_config, $this->config->item('image_configuration') );
$this->load->library('upload', $config);
This is not working. What is the proper way to do this?