WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

PHP ftp_delete () function


Definition and usage

The ftp_delete () function deletes a file on the FTP server.

If successful, the function returns TRUE. If it fails, FALSE and a warning are returned.

Syntax

ftp_delete (ftp_connection, file)

parameters description
ftp_connection Required. Specifies the FTP connection to use.
file Required. Specifies the path of the file to be deleted.


Example

<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

echo ftp_delete($conn,"test.txt");

ftp_close($conn);
?>

The above code will output:

1