CI version 2.1.4
I have created a file upload section in CI version 2.1.4 for text files. That is working fine for all normal text files. But if am trying to upload the text file which contains the word "program" unfortunately CI file validation showing unsupported file format. I tried to print the file type after adding the word "Program" but it is same as earlier(text/plain). I googled also but not getting any solution.
Please help me on this.
Config Variable
$config['allowed_attachment_types'] = 'gif|jpg|png|pdf|doc|docx|xlsx|word|xls|csv|txt|text';
Controller upload section
if ( ! $this->upload->do_upload('file')){
$this->session->set_flashdata('growl_success', $this->upload->display_errors());
redirect('/common/lists/edit/'.$id,'refresh');
} else {
$uploaded = $this->upload->data();
$data_attachment['id_list'] = $this->input->post('id_list');
$data_attachment['filename'] = $uploaded['file_name'];
$data_attachment['title'] = $this->input->post('attachment_title');
$data_attachment['description'] = $this->input->post('attachment_description');
$data_attachment['public_yn'] = $this->input->post('public_yn');
$data_attachment['created_by'] = $this->ion_auth->user()->row()->id;
$data_attachment['modified_by'] = $this->ion_auth->user()->row()->id;
$this->attachment->update_attachment($this->input->post('id_attachment'),$data_attachment);
redirect('/common/lists/edit/'.$id_list,'refresh');
}