ftp_delete
Delete files on the FTP server.
ftp_delete() function deletes a file on the FTP server.
Return true if successful, otherwise return false.
<?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);
?>
输出:
1
ftp_delete ( ftp_connection , path )
| parameter | describe |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
| path | Required. Specify the path to the file to be deleted. |
The ftp_delete() function is used to delete a file on the FTP server specified by the parameter path .