title: How to check a file is video type or not in php?
body: <p>I have following script:</p>
  
  <pre><code>function listFolderFiles($dir){
      $ffs = scandir($dir);
      echo '&lt;ol&gt;';
      foreach($ffs as $ff){
          if($ff != '.' &amp;&amp; $ff != '..'){
              echo '&lt;li&gt;'.$ff;
              if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff);
              echo '&lt;/li&gt;';
          }
      }
      echo '&lt;/ol&gt;';
  }
  listFolderFiles('upload');
  </code></pre>
  
  <p>My question is I want to detect a file is video(mp4 or mov)type, How i can detect $ff is a video type or not?</p>