Thank you. That one worked for me with an empty folder.
But since I have things in the folder as well I tried to add something, but it won't delete my files. Why not?
PHP Code:
unlink("$file/*.*");
rmdir($file); # deletes the folder
Then I tried to add one code that deletes all file types I think will be in the folder with this code.
But that one isn't working either.
PHP Code:
unlink("$file/*.mp3");
unlink("$file/*.wav");
unlink("$file/*.aif");
unlink("$file/*.jpg");
unlink("$file/*.png");
unlink("$file/*.gif");
rmdir($file); # deletes the folder
What is wrong with my code?
When using just the rmdir to remove an epmty folder it works fine, but I have to remove things in the folder first...
Bookmarks