i like there to be a index file in every folder on my webserver, now it would not be a problem if i was the only person who has ftp access but im not, and many people create new dirs, so i want to write a cron that will, say once a week run through the entire directory structure checking for a index.php file in every folder, if there is one to pass on to the next folder, and if there is not one to create a blank index.php file
i have used this code to create an array of all the files and folders
Code: Select all
<?php
$folder = "/";
if($handle = opendir($folder))
{
for($i = 0; $files = readdir($handle); $i++)
{
if ($files != "." && $files != ".." && $files != "Thumbs.db")
{
$array[$i] = $files;
}
}
}
?>thanx