Setting a config value dynamically in the controller in Codeigniter?
Try this:
if ($_FILES['image']['size']!=0) { $path = $this->homeModel->createDirectories($id); $this->config->load('upload', TRUE); $config = $this->config->item('upload'); $config['upload_path'] = $path; $this->upload->initialize($config); //etc.}