This function copy recursive files and folders in php function recursive_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != ‘.’ ) && ( $file != ‘..’ )) { if ( is_dir($src…
This function copy recursive files and folders in php function recursive_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != ‘.’ ) && ( $file != ‘..’ )) { if ( is_dir($src…
This function do recursive delete on files and folders in php function recursiveDelete($str){ if(is_file($str)){ return @unlink($str); } elseif(is_dir($str)){ $scan = glob(rtrim($str,’/’).’/*’); foreach($scan as $index=>$path){ recursiveDelete($path); } return @rmdir($str); } }