PPHP How to remove a directory and it’s content using PHPbySGHDecember 5, 2011 Here is a snippet that can help you to remove a non-empty directory from the server. It’s a recursive function that deletes the directory with its files, folders and sub-folders.