Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rcopy($src, $dst) {
- if (file_exists ( $dst ))
- rrmdir ( $dst );
- if (is_dir ( $src )) {
- mkdir ( $dst );
- $files = scandir ( $src );
- foreach ( $files as $file )
- if ($file != "." && $file != "..")
- rcopy ( "$src/$file", "$dst/$file" );
- } else if (file_exists ( $src ))
- copy ( $src, $dst );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement