File "suppression.php"

Full path: /home/meharicl/www/diaporama/suppression.php
File size: 1.4 B
MIME-type: text/html
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
</head>
<body bgcolor="#FFFFFF">
<?php
  // Your code here

      // clearFolder("upload.bof");
      if (isset($_POST['album'])){$dir = "upload/".($_POST['album']);}
 // Ouvre un dossier bien connu, et liste tous les fichiers
if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
        if(($file!='.')&&($file!="..")){
            //echo "fichier : $file '" . $file . "<br>";
            unlink($dir.'/'.$file);
            }
        }
        closedir($dh);
    }
}
  header('Location: http://www.mehariclubdefrance.com/phpBB3/');


/*function clearFolder($folder)
{
 // 1 ouvrir le dossier
        $dossier=opendir($folder);
        //2)Tant que le dossier est aps vide
        while ($fichier = readdir($dossier))
        {
                //3) Sans compter . et ..
                if ($fichier != "." && $File != "..")
                {
                        //On selectionne le fichier et on le supprime
                        $Vidage= $folder.$File;
                        unlink($Vidage);
                }
        }
        //Fermer le dossier vide
        closedir($dossier);
}*/
?>
</body>

</html>