I used…
rmdir($FOLDER);
…to remove a folder from the server.
However, it will only work when the folder is empty (ie. no files in it). And it doesnt matter if all the files have 777-permission (read-write-execute for all).
Is there a command that will delete the folder and all its content without having to go trough an exhausting “search-all-the-files-in-the-folder-and-delete-them” algortihm?