Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function recurse_copy($src,$dst) {
- $dir = opendir($src);
- @mkdir($dst);
- while(false !== ( $file = readdir($dir)) ) {
- if (( $file != '.' ) && ( $file != '..' ) && ( $file != 'Obj' )) {
- if ( is_dir($src . '/' . $file) ) {
- recurse_copy($src . '/' . $file,$dst . '/' . $file);
- }
- else {
- if($file != 'compile.php'){
- if(file_exists($dst . '/' . $file))
- {
- if(filemtime($src . '/' . $file) > filemtime($dst . '/' . $file))
- {
- copy($src . '/' . $file,$dst . '/' . $file);
- }
- }
- else
- {
- copy($src . '/' . $file,$dst . '/' . $file);
- }
- }
- }
- }
- }
- closedir($dir);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement