I have a PHP script that connects to a FTP server, but how can I delete all files in the directory?
Laura Unselected an answer November 1, 2020
There is no PHP function to delete all files in a directory.
You can list all files with ftp_nlist().
Use a loop to delete all files with ftp_delete().
Laura Changed status to publish October 26, 2020