fonction is_file() et is_dir()
bonjour,
je n'arrive pas a comprendre pourquoi je ne rentre pas des mes boucke if():
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| function suppr_dossier($chemin)
{
echo "chemin: ".$chemin."<br>";
$contenu = dir($chemin);
while($fich=$contenu->read())
{
echo "<br>".$chemin.$fich;
if (($fich != ".") && ($fich != ".."))
{
if(is_dir($fich))
{
echo "<br>ici1<br>";
suppr_dossier($chemin."/".$fich);
rmdir($fich);
}
if(is_file($fich))
{
echo "<br>ici2<br>";
$chemin2=$fich;
unset ($chemin2);
}
}
}
rmdir($chemin);
} |
Si quelqu'un peut m'aider car je n'ai rien trouver d'interessant ailleur.
Merci d'avance
Nixonne