I made a script that's supposed to delete a directory, but the operation isn't permitted. When I try to chmod the file that's deleting the directory to 777, an Internal Server Error appears. I'm using unlink() to destroy my directory. The folder is 777.
jatar_k
9:28 pm on Sep 24, 2005 (gmt 0)
you can't use unlink on a directory it is only for files. you must use rmdir() [php.net] to remove a directory.
keep in mind the directory must be empty and the user trying to delete must have the appropriate permissions to do so.