Hacker News new | past | comments | ask | show | jobs | submit login

  // php function for getting an array of filenames for a given directory...

  function dirscan($directory)
  {
    $fileset = array();
    if ($handle = opendir($directory))
    {
      while (false !== ($file = readdir($handle)))
      {
        if (($file != ".") && ($file != ".."))
        {
          $fileset[] = $file;
        }
      }
      closedir($handle);
    }
    return $fileset;
  }



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: