Hi
i have sub-directories like this (files/dir/dir2/) and have input text
I want to get all the doc files in the sub-directories when insert name of top directory (files)in the text field
Hi
i have sub-directories like this (files/dir/dir2/) and have input text
I want to get all the doc files in the sub-directories when insert name of top directory (files)in the text field
OK. And what part of that do you need help with?
I used this function to list files at only sub directory i want to list all files at sub directories of top folder and count of it
$myDirectory = opendir("");
// get each entry
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}
// close directory
closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
$indexFile = count($dirArray);
Print ("$indexFile file<br>\
");
// sort 'em
sort($dirArray);
// print 'em
?><table width="100%"><tr><td>
<?
print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\
");
print("<TR><TH>ffiles</TH></TR>\
");
// loop through the array of files and print them all
for($index=0; $index < $indexCount; $index++) {
if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files
print("<TR><TD><a href=\\"$dirArray[$index]\\">$dirArray[$index]</a></td>");
print("</TR>\
");
}
}
any help???
You’ve copied and pasted this code from a webpage. Have you attempted to modify it to do what you want at all?