glob

It finds pathnames matching a pattern

Example

<?php

foreach (glob(“*.txt”) as $file) {

  echo $file;

}

?>

Share