per il momento ho risolto così
Codice PHP:
<?php
$nome = $_POST['nome_album'];
$cartella = "images/gallery/foto/$nome/";
if (is_dir("$cartella"))
{
echo "La cartella esiste!";
}
else
{
header("Location: cancella_album.php");
}
$apertura = opendir($cartella);
$log = array();
while (false !== ($file = readdir($apertura)))
{
if (!is_dir($file))
{echo $file;
$log[] = $file;
unlink($cartella.$file);
}
}
closedir($apertura);
rmdir("$cartella");
header("Location: cancella_album.php");
?>
appena capisco come chiamare la funzione userò il tuo scrip... grazie ancora