SyntaxFix
Write A Post
Hire A Developer
Questions
I generally use this to delete all files in a folder:
array_map('unlink', glob("$dirname/*.*"));
And then you can do
rmdir($dirname);