PHP ftp_delete( ) Function

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

Syntax:

ParameterDescriptionIs compulsory
ftp_connectionThe link identifier of the FTP connection.compulsory
file_nameThe file to delete.compulsory

Returns

The ftp_delete( ) function returns true on success or false on failure.

Example 1

Explanation

In the above example, we are deleting one file from a specific location which is available in FTP server.

Example 2

Explanation

In the above example, if the file is deleted, its echo deleted successful, if not, then it echo could not delete.


Next TopicPHP FTP




Latest Courses