Recursively delete whole directories with this function.
This PHP function scans a given directory and deletes all files and subdirectories it finds and has permission to delete.
Per default it removes the given directory totally, but you can specify to just "empty" it instead.
In this case it deletes everything inside the given directory and keeps the directory itself.
Since you can't delete non-empty directories with one of PHPs own functions,
here is the







