$source. '/' .$fichier,
'destination/fichier' => $destination. '/' .$fichier,
],'');
}
if (is_dir($source. "/" .$fichier)) {
@mkdir($destination, fileperms($source));
copierDossier("$source/$fichier", "$destination/$fichier");
}
else {
if (!file_exists("$source/$fichier")) {
echo "
❌ Fichier source introuvable : $source/$fichier";
}
else {
if (!file_exists("$destination/")) {
echo "
❌ Fichier cible introuvable : $destination/";
}
else {
// echo "
✅ Copie : $source/$fichier → $destination/$fichier";
copy("$source/$fichier", "$destination/$fichier");
$total++;
}
}
}
}
}
}
else {
$adminMsg .='
Pas de src =' .$source;
}
return $total;
}
?>