Exemplo n.º 1
0
Arquivo: app.php Projeto: BernanR/ipvd
 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']);
             }
         }
     }
 }