i want to write a page that will traverse a specified directory.... and get all the files in that directory...
in my case the directory will only contain images and dis
You could also try the glob function:
$path = '/your/path/'; $pattern = '*.{gif,jpg,jpeg,png}'; $images = glob($path . $pattern, GLOB_BRACE); print_r($images);