title: Use PHP to list file names in a folder selected by the user
body: <p>I have tried the HTML5 webkitdirectory approach to upload all the files in a specified directory.</p>
  
  <pre><code>&lt;input type="file" name="files[]" id="files" multiple="" directory="" webkitdirectory="" /&gt;
  </code></pre>
  
  <p>However, I only want the list of file names in the directory selected by the user, instead of having the browser upload all the files to the server.</p>
  
  <p>Basically, I want to apply the scandir() function on the client side. Is there any other way of achieving this?</p>