PHP ftp_rmdir( ) function

The ftp_rmdir() function is used to delete a directory on the FTP server. This function was introduced in PHP 4.

Syntax:

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

Return value:

The ftp_rmdir()function returns TRUE on success and FALSE on failure.

Important note: A directory must be empty before it can be deleted.

Example 1

Output:

PHP ftp_rmdir( ) function

Example 2

Output:

PHP ftp_rmdir( ) function

Example 3

Output:

PHP ftp_rmdir( ) function
Next TopicPHP FTP




Latest Courses