/ Published in: PHP

Easily copy a folder to a new destination.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? function copy_directory( $source, $destination ) { while ( FALSE !== ( $readdirectory = $directory->read() ) ) { if ( $readdirectory == '.' || $readdirectory == '..' ) { continue; } $PathDir = $source . '/' . $readdirectory; copy_directory( $PathDir, $destination . '/' . $readdirectory ); continue; } } $directory->close(); }else { } } ?>
Comments
