here is my path
c:\Customers\NCR\Las Piñas
and im trying to get all the csv files.
I did the code from here (see top answer) php glob - scan in subfolders for a file
and also did a mixed recursive and glob
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
$html = "";
foreach ($iterator as $folder) {
if ($folder->isDir()) {
$all_files = glob($folder->getRealpath() . "/*.csv");
foreach ($all_files as $filename) {
$html .= $filename . PHP_EOL;
}
}
}
echo $html;
and still cant read the csv inside this folder