Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. function dirlist()
  2.           {
  3.           $dirPath = dir($main['path']);
  4.           $fileArray = array();
  5.           while(($fileArray = $dirPath->read()) !== false)
  6.           {
  7.           if((substr($file,-3)=="mkv") && (substr($file,-5)!=="d.mkv"))
  8.           {
  9.           $fileArray[] = trim($file);
  10.           }
  11.           }
  12.           $dirPath->close();
  13.           sort($fileArray);
  14.           $c = count($fileArray);
  15.           for($i=0;$i<$c;$i++)
  16.           {
  17.           echo "<option value=\"".$fileArray[$i]."\">".$fileArray[$i]."\n";
  18.           }
  19.           }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement