I am uploading a csv file, however it returns the invalid extension error, even though the extension is freed. I was looking for the cause of the error and found it is because of a line that is in the file.
if (!$this->upload->do_upload()) {
$this->session->set_flashdata('erro', $this->upload->display_errors());
redirect(base_url() . 'updb/up_numeros/' . $tipo);
exit;
}
Between the lines of the csv file there is one with the following text:
COLUNA 1 COLUNA 2
C TESTE - 6173 2
When I delete the line or include an empty space or any other character in column 1, the upload is successful.
Does anyone have any idea where the error might be?