Skip to content

Instantly share code, notes, and snippets.

@cogentParadigm
Created September 19, 2012 23:35

Revisions

  1. cogentParadigm created this gist Sep 19, 2012.
    11 changes: 11 additions & 0 deletions readdir.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <?php

    if ($handle = opendir($dir)) {
    while (false !== ($entry = readdir($handle))) {
    if ($entry != "." && $entry != "..") {
    //$entry is the file or directory name
    }
    }
    }

    ?>