Created
January 15, 2020 10:21
-
-
Save Mouerr/6edfacf34a4738ce8d61fd4708f5fd47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static function recurseCopy($src, $dst) | |
{ | |
$dir = opendir($src); | |
@mkdir($dst, 0777, true); | |
while (false !== ($file = readdir($dir))) { | |
if (($file !== '.') && ($file !== '..')) { | |
if (is_dir($src.'/'.$file)) { | |
self::recurseCopy($src.'/'.$file, $dst.'/'.$file); | |
} else { | |
copy($src.'/'.$file, $dst.'/'.$file); | |
} | |
} | |
} | |
closedir($dir); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment