Thanks! I'm still having some problems. I'm relatively new to PHP and have never worked with recursion and iteration (I may have, but just don't know it). So I have been doing some research on these topics. The code you gave me makes sense, but now it seems like the following piece of code is being ignored:
if (is_dir($file)) {
rmdirAll($final_path . '/' . $file);
I get the following error when I try to delete a directory that contains a subdirectory:
Warning: unlink(../ftp/files/test/test) [function.unlink]: Is a directory in...
Warning: rmdir(../ftp/files/test) [function.rmdir]: Directory not empty in...
I am trying to delete a directory named "test" that contains a subdirectory named "test".
I appreciate all of you help! Any thoughts? Thanks!