title: yii2 get filepath of the uploaded local file
body: <p>I want to ask about how to get the file path of the file i want to upload from file input, the code is like this</p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'file')-&gt;fileInput() ?&gt;
  </code></pre>
  
  <p>the problem is i want to automatically send the file as attachment of email without uploading the file to hosting, which required the path of local file</p>
  
  <pre><code> -&gt;attach('C:/Users/User/Downloads/file/file.pdf')
  </code></pre>
  
  <p>I want to get file path like </p>
  
  <pre><code>'C:/Users/User/Downloads/file/file.pdf'
  </code></pre>
  
  <p>is it possible? or there is another method to fix my problem?
  Thanks in advance</p>