File Directory Php

     $dr = @opendir('/tmp/');
     if(!$dr) {
          echo "Error opening the /tmp/ directory!
";
          exit;
     }
     while(($files[] = readdir($dr)) !== false);
     print_r($files);
?>