title: $_FILES is empty in CodeIgniter
body: <p>I'm developing a form using CodeIgniter. In this, one of the fields is to upload a file. I followed some tutorials about file uploading in CodeIgniter successfully, but, in my work, the $_FILES is always empty, and I can't see why. I'm a newbie in this framework.</p>
  
  <p>The view:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;?php
              $this-&gt;load-&gt;helper('form');
              echo form_open_multipart($action); ?&gt;
              Área:
              &lt;select&gt;
                  &lt;option value="1"&gt;Teste 1&lt;/option&gt;
                  &lt;option value="2"&gt;Teste 2&lt;/option&gt;
              &lt;/select&gt; &lt;br&gt;
  
              Data de abertura: &lt;input type="text" id="data_abertura" placeholder="tqv"&gt; &lt;br&gt;
  
              Prioridade:&lt;br&gt;
              &lt;input type="radio" name="prioridade" value="3"&gt;Alta&lt;br&gt;
              &lt;input type="radio" name="prioridade" value="2"&gt;Média&lt;br&gt;
              &lt;input type="radio" name="prioridade" value="1"&gt;Baixa&lt;br&gt;
  
              Anexar arquivo: &lt;input type="file" accept="image/*, text/*, .doc, .docx, .pdf" name="arquivo" id="arquivo"&gt;&lt;br&gt;
  
              Descrição: &lt;br&gt;&lt;textarea rows="4" cols="50" id="descricao" name="descricao"&gt;&lt;/textarea&gt;&lt;br&gt;
              &lt;input type="submit" id="enviar" name="enviar" value="Enviar"&gt;
           &lt;?php echo form_close() ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The controller:</p>
  
  <blockquote>
  <pre><code>&lt;?php 
  class c_Formulario extends CI_Controller {
  public function __construct() 
  {
      parent::__construct();
      $this-&gt;load-&gt;helper('url');
  }
  
  public function index()
  {
      $data['action'] = site_url('c_formulario/inserir_dados');
      $this-&gt;load-&gt;view('v_formulario', $data);
  }
  
  public function inserir_dados()
  { 
      $config['upload_path'] = './upload/';
      $config['allowed_types'] = 'gif|jpg|png|doc|docx|pdf|txt';
      $config['max_size'] = '100';
  
      $this-&gt;load-&gt;library('upload');
      $this-&gt;upload-&gt;initialize($config);
      var_dump($_FILES);
  
      foreach($_FILES as $field =&gt; $file)
      {
          //var_dump($_FILES); die();                
          // No problems with the file
          if($file['error'] == 0)
          {
              // So lets upload
              if ($this-&gt;upload-&gt;do_upload($field))
              {
                  $data = $this-&gt;upload-&gt;data();
                  echo $data['full_path'];
              }
              else
              {
                  $errors = $this-&gt;upload-&gt;display_errors();
                  var_dump($errors);
              }
          }
      }
  
      $this-&gt;load-&gt;model('m_formulario', '', TRUE);
  
      $area = array('id' =&gt; null, 'nome' =&gt; $this-&gt;input-&gt;post('area', TRUE));
      $data = array('id' =&gt; null, 'dataabert' =&gt; $this-&gt;input-&gt;post('data_abertura', TRUE));
      $prioridade = array('id' =&gt; null, 'nome_prioridade' =&gt; $this-&gt;input-&gt;post('prioridade', TRUE));
      $arquivo = array('id' =&gt; null, 'urlarquivo' =&gt; $this-&gt;input-&gt;post('arquivo', TRUE));
      $descricao = array('id' =&gt; null, 'descricao' =&gt; $this-&gt;input-&gt;post('descricao', TRUE));
  
      $dados = array
      (
          'area' =&gt; $area, 
          'data' =&gt; $data,
          'prioridade' =&gt; $prioridade,
          'arquivo' =&gt; $arquivo,
          'descricao' =&gt; $descricao
      );
  
      $this-&gt;m_formulario-&gt;inserir($dados);
  }
  </code></pre>
  </blockquote>
  
  <p>Thanks any help!</p>