How do I recursively get all *.php
files? With the code below I get everyone who is root, but I wanted to get it from all the directories.
I tried using RecursiveDirectoryIterator
, or use some of the functions I found in SOen, type this , but nothing ...
function getPageFiles()
{
$directory = '';
$pages = glob($directory . "*.php");
//print each file name
foreach ($pages as $page){
$row[$page] = $page;
}
return $row;
}