Brad,
Okay, I was TOTALLY misreading what you wrote. I changed the .htaccess file and it sets them to forbidden, which is great. Thank you very much.
However, in the case that any file, "not necessarily" a blank index file, needs to be inserted into every dir and subdir, I am still hashing out a script now, just to get more familiar with php.
What I have so far parses all dirs and places them in an array (and currently prints to the screen to show the dirs).
I'm assuming next I need to, while looping, check to see if the current directory has "file A" and if so, move to the next, if not place a copy of the file in that directory and move on.
The issue is, how do I "place" a file in there? I could have the file in a current directory and have that url = to a variable, but how do actually "put/place" it in there?
Thanks in advance...
function listdirs($dir) {
static $alldirs = array();
$dirs = glob($dir . '/*', GLOB_ONLYDIR);
// GLOB_ONLYDIR - Return only directory entries which match the pattern " dir + '/*' "
if (count($dirs) > 0) {
foreach ($dirs as $d) // Value of current element in $dirs array is set to element in variable $d...
{$alldirs[] = $d;} // ...which is then set and stored in $alldirs array.
}
for ($k=0; $k<count($alldirs); $k++) {
print "$alldirs[$k] <br />";
}
return $alldirs;
}
listdirs('images'); // Change this directory to start parsing from.