Jump to content

Keep getting error when trying to delete directory


pneudralics

Recommended Posts

I keep getting permission denied error for my rmdir(). All files are deleting but when trying to delete the directory afterwards I keep getting errors.

function EmptyDir($search_dir) {
$handle=opendir($search_dir);

while (($file = readdir($handle))!==false) {
@unlink($search_dir.'/'.$file);
}

closedir($handle);

rmdir($search_dir); //Delete directory

}

EmptyDir($search_dir);

//Warning: rmdir(../../gallery/fdfgdfg) [function.rmdir]: Permission denied  
//Directory:fdfgdfg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.