PHP ftp_rmdir() Function

The ftp_rmdir() function deletes a directory on the FTP server.

bool ftp_rmdir ( resource $ftp_stream , string $directory )

Removes the specified directory on the FTP server.

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
directoryThe directory to delete. This must be either an absolute or relative path to an empty directory.

Returns TRUE on success or FALSE on failure.