Error loading .sql files

0

I am trying to load files with the function upload , but when I try to upload a file .sql , I get a message that says:

  

The type of file you are trying to upload is not allowed.

$config['upload_path']      = './doc_anexa';
$config['allowed_types']    = 'txt|doc|docx|sql|xls';
$config['overwrite']        = true;


$this->load->library('upload', $config);

if ( ! $this->upload->do_upload('userfile')){

        $error = array('error' => $this->upload->display_errors());
        print_r($error);

    }else{
           $data = array('upload_data' => $this->upload->data());

           $this->load->view('upload_success', $data);

        }
    
asked by Jassan 26.12.2018 в 23:55
source

0 answers