PHP ftp_delete() Function

The ftp_delete() function is used to delete a file on the FTP server.

bool ftp_delete ( resource $ftp_stream , string $path )

ftp_delete() deletes the file specified by path from the FTP server.

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
pathThe file to delete

Returns TRUE on success or FALSE on failure.