Jump to content

Problem in Folder delete


aruns

Recommended Posts

Hello Guys,

      This function was i am using to dynamic delete folder but it says

          Warning: rmdir(xxxxxxxxx) [function.rmdir]: Permission denied in ############## on line 96.... Help me i am worry about that....

function delete_folder($ftp_path){
if(is_dir($ftp_path)){
	$folder_files = get_all_contents($ftp_path);
	for($i=0; $i<=count($folder_files); $i++){
		if(is_file($folder_files[$i])){
			unlink($folder_files[$i]);
		}elseif(is_dir($folder_files[$i])){
			delete_folder($ftp_path . $folder_files[$i]);
		}
		chmod($ftp_path, 0777);
		return rmdir($ftp_path);
	}
}
}

Link to comment
https://forums.phpfreaks.com/topic/143744-problem-in-folder-delete/
Share on other sites

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.