php get all files from directory and subdirectories code example Example: php get all php files in a directory foreach(glob('includes/*.php') as $file) { ... }