Created
December 24, 2018 10:17
-
-
Save TinyPoro/bc4c458e15f7053a68e3282fe115fa2f to your computer and use it in GitHub Desktop.
This file contains 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
public function recurse_copy($src,$dst) { | |
$dir = opendir($src); | |
@mkdir($dst); | |
while(false !== ( $file = readdir($dir)) ) { | |
if (( $file != '.' ) && ( $file != '..' )) { | |
if ( is_dir($src . '/' . $file) ) { | |
$this->recurse_copy($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