pneudralics Posted September 12, 2009 Share Posted September 12, 2009 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 Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/ Share on other sites More sharing options...
Maq Posted September 12, 2009 Share Posted September 12, 2009 Well what are the permission on the directory and who's the owner? Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/#findComment-917365 Share on other sites More sharing options...
pneudralics Posted September 12, 2009 Author Share Posted September 12, 2009 Well what are the permission on the directory and who's the owner? Permission when created is 777. I'm not understanding the owner part. This is all on WAMP on my computer. Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/#findComment-917369 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.