I am using PHP to move the contents of a images subfolder
GalleryName/images/
into another folder. After the move, I need to del
public static function rrmdir($dir) { if (is_dir($dir)) { $files = scandir($dir); foreach ($files as $file) { if ($file != "." && $file != "..") { if (filetype($dir . "/" . $file) == "dir") self::rrmdir($dir . "/" . $file); else unlink($dir . "/" . $file); } } reset($files); rmdir($dir); } }