title: CakePHP How to get data from csv file after upload
body: <p>I created a form with input type <code>file</code>, button submit to access to a function in controller, the problem is I can't get data from that file.
  in controller when I call :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function displayAll() {
  
   $adherents = $_FILES['file']['tmp_name'];
   prd($adherents);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I found this error</p>
  
  <blockquote>
    <p>Undefined index: file [APP\controllers\adherents.php, line 36]</p>
  </blockquote>
  
  <p>and this is the view:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h2&gt;Upload filer&lt;/h2&gt;
  &lt;br&gt;
  &lt;fieldset class="pano bleu"&gt;
  
  &lt;?php echo $this-&gt;Form-&gt;create('adherentsSuph', array('action'=&gt;'displayAll'));?&gt;
  
   &lt;?php
    echo $this-&gt;Form-&gt;input('file', array('type' =&gt; 'file'));
    echo $bouton-&gt;block(array(
              'cancel'=&gt;array('action'=&gt;'index'),
              'submit'=&gt;array('id'=&gt;'addAdherentFile')
      ));
    echo $this-&gt;Form-&gt;end();?&gt;
  &lt;/fieldset&gt;</code></pre>
  </div>
  </div>
  </p>