#key - FORMULAIRE DE MODIFICATION DES DROITS CHMOD DES FICHIERS ET DOSSIERS
";
print "Changer les droits d'accès CHMOD aux dossiers et fichiers
dans votre hébergement.
";
print "";
print "
";
if ( ($dosPerm||$ficPerm) > 0 ){
function rChmod($chem,$dosPerm,$ficPerm) {
echo "Journal:
\r\n";
$d = new RecursiveDirectoryIterator($chem);
$d ->setFlags(RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new RecursiveIteratorIterator($d, 1) as $path) {
$chmodret = false;
$chmodresultat = "";
if ( $path->isDir() ) {
$chmodret = chmod( $path, $dosPerm ); }
else {
if ( is_file( $path ) ) {
$chmodret = chmod( $path, $ficPerm ); }
}
if ($chmodret) {$chmodresultat = "OK"; }
else {
$chmodresultat = "ERREUR";
++$retval;
}
echo $chmodresultat . " " . $path . "
\r\n";
}
return $retval;
}
$nbfailed = rChmod($chem,$dosPerm,$ficPerm);
echo "";
if ($nbfailed > 0) {
echo $nbfailed . " erreur(s) CHMOD. Voyez le journal ci-dessus.";
}
else echo "Pas d'erreur apparente. Vérifiez par vous-même.
\r\n";
}
?>