salve navigando sul web ho trovato uno script che elimina le cartelle che sono dentro la direttori es: documenti/ nome cartelle lo script ha un box dove metto la spunta al nome cartella da eliminare ma mi da errore unlink riga 81 chiedo aiuto grazie posto lo script
PHP:
<?Php
$dir='documenti'; // directory name
$ar=scandir($dir);
$box=$_POST['box']; // Receive the file list from form
// Looping through the list of selected files ///
while (list ($key,$val) = @each ($box)) {
$path=$dir ."/".$val;
if(unlink($path)) echo "Deleted file ";
echo "$val,";
}
echo "<hr>";
$ar=scandir($dir);// Once again directory content is scanned to exclude deleted files.
/// displaying the file names with checkbox and form ////
echo "<form method=post name='f1' action=''>";
while (list ($key, $val) = each ($ar)) {
if(strlen($val)>3){
echo "<input type=checkbox name=box[] value='$val'>$val<br>";
}
}
echo "<input type=submit value='Delete'></form>";
?>
Ultima modifica di un moderatore: