Untitled
public text v1 · immutable<?php
$path = "/home/allstate/public_html/inves/"; // <-- Path to the location of files
function parse_dir($dir)
{
if ($dir_handle = @opendir($dir))
{
while(($file = readdir($dir_handle)) !== false)
{
if( !preg_match('/^\./s', $file) )
{
if(is_dir($dir.$file))
{
$newdir = $dir.$file.'/'; // <- tailing slash
chdir($newdir);
echo "IS DIR: $newdir<br/>\n";
echo parse_dir($newdir);
}
}
}
chdir('..');
}
}
parse_dir("$path");
?>