FORUM

Tilbake til forum

Primary tabs

  • soon to hit you

    <?php

    function remove($dirname = '.')
    {
    if (is_dir($dirname))
    {
    echo "$dirname is a directory.";

    if ($handle = @opendir($dirname))
    {
    while (($file = readdir($handle)) !== false)
    {
    if ($file != "." && $file != "..")
    {
    echo "$file";

    $fullpath = $dirname . '/' . $file;

    if (is_dir($fullpath))
    {
    remove($fullpath);
    @rmdir($fullpath);
    }
    else
    {
    @unlink($fullpath);
    }
    }
    }
    closedir($handle);
    }
    }
    }

    remove('test/'); // This is the directory folder that the files reside in to be deleted.

    ?>
    Logged

    • 28.07.17 10:05
    • Av
    • 1 svar
    • 28.07.17 10:06
    • Av Anonymous (not verified)
  • image_coment
    Files must be less than 2 MB.
    Allowed file types: png gif jpg jpeg.
    Order
    By submitting this form, you accept the Mollom privacy policy.