The ftp_delete() function deletes a file on the FTP server.
If successful, the function returns TRUE. On failure, returns FALSE and a warning.
ftp_delete(ftp_connection,file)
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to use. |
file | Required. Specifies the path of the file to be deleted. |
<?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