in reply to Why aren't system() calls working?
Or, if you need to do a recursive rm, you can use File::Path's rmtree method.$result = rmdir($directory); if ($result) { print "Directory '$directory' removed.\n"; } else { print "Directory '$directory' not removed: $!\n"; }
If your code works from the command line but not via the web server, there must be some difference between the users or the environments. Note that, in order to delete a directory, you must have write access to that directory and its parent directory.
|
|---|