public function upload_arquivo() { if (isset($_POST["submit"])) { $file = $_FILES; if ($file['file']['name'] == '') { $this->base->set_msg('error', "Selecione um arquivo csv"); } else { $this->base->load_helper('csv'); $csv = new Csv(); if ($csv->upload()) { $this->inserir($file['file']['name']); } } } }