I am using mkdir() to make a directory, and it works fine, but if i want to delete the directory, it wont let me...
here is the code i am using:
PHP Code:$dir = "pics/$memid/";
if(!is_dir($dir)) {
mkdir($dir, 0777);
}
Printable View
I am using mkdir() to make a directory, and it works fine, but if i want to delete the directory, it wont let me...
here is the code i am using:
PHP Code:$dir = "pics/$memid/";
if(!is_dir($dir)) {
mkdir($dir, 0777);
}
I presume you are using rmdir to remove the directory?
The directory must also be empty before deleting :wave:
well no i am manually deleting them through FTP. I get the error like "You dont have proper authorization to delete these files"
I cant delete the folder, subfolders or files
well it sounds like the mode you set didn't take... Perhaps your host doesn't allow chmod?
well i am sure it does, we are on a Semi-Dedicated Hosting account
i tried to delete the files with:
unlink($location);
and it didnt work either, returned an error
is it a unix host?
either way, this is a permissions issue. nothing php can do to help you! ask your host if they allow chmod and what might be causing an error like that.
OK thanks guys. I will get back with the answer.