<?php
file_fix_directory
(dirname(__FILE__));
function file_fix_directory
($dir,
$nomask =
array('.',
'..',
'CVS')) {
// Try to make each directory world writable.
if (@
chmod($dir,
0777)) {
echo "<P>Made writable: " .
$dir .
"</p>";
}
}
while (false !==
($file =
readdir($handle))) {
if (!
in_array($file,
$nomask) &&
$file[0] !=
'.') {
// Recurse into subdirectories
file_fix_directory("$dir/$file", $nomask);
}
else {
$filename = "$dir/$file";
// Try to make each file world writable.
if (@
chmod($filename,
0666)) {
echo "<P>Made writable: " .
$filename .
"</p>";
}
}
}
}
}
}
?>