php - How to catch any file recursively -


the following code catches files recursively in php extension.

$paths = new \recursiveiteratoriterator(new \recursivedirectoryiterator($realpath), \recursiveiteratoriterator::self_first); $files = new \regexiterator($paths, '/\.(?:php)$/', \regexiterator::match);  foreach($files $file){     ... 

i want files extension. want replace it: '/\.(?:php)$/'

wouldn't change

  /\.(?:php)$/ 

to

 /.*/ 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -