public static function rrmdir($path) {
		if (is_file($path)) {
			return unlink($path);
		} elseif (is_dir($path)) {
			$dir_members = scandir($path);
			foreach ($dir_members as $member) {
				if ($member !== '.' && $member !== '..') {
					static::rrmdir($path.'/'.$member);
				}
			}
			return @rmdir($path);
		}
	}
public static function rrmdir($path) {
		if (is_file($path)) {
			return unlink($path);
		} elseif (is_dir($path)) {
			$dir_members = scandir($path);
			foreach ($dir_members as $member) {
				if ($member !== '.' && $member !== '..') {
					static::rrmdir($path.'/'.$member);
				}
			}
			return @rmdir($path);
		}
	}
public static function rrmdir ( $ path ) { if ( is_file ( $ path ) ) { return unlink ( $ path ) ; } elseif ( is_dir ( $ path ) ) { $ dir_members = scandir ( $ path ) ; foreach ( $ dir_members as $ member ) { if ( $ member !== '.' && $ member !== '..' ) { static :: rrmdir ( $ path . '/' . $ member ) ; } } return @ rmdir ( $ path ) ; } }
Delete a folder and all subfolders.

@param string $path The absolute path to the folder to delete.
@return bool Success/Failure.
Delete a folder and all subfolders .