<?php
defined('ROOT_PHPLEFT') or exit('phpleft: Not page');
function copyDir($source, $destination, $child = '1'){
    if(!is_dir($source)){
    echo("Error:the $source is not a direction!");
    return 0;
    }
    if(!is_dir($destination)){
    mkdir($destination,0777);
    }
    $handle=dir($source);
    while($entry=$handle->read()) {
        if(($entry!=".")&&($entry!="..")){
            if(is_dir($source."/".$entry)){
                if($child)    copyDir($source."/".$entry,$destination."/".$entry,$child);
            }else{
                copy($source."/".$entry,$destination."/".$entry);
            }
        }
    }
    return true;
}

/*
	phpleftDms Copyright (c) 2011 phpleft.COM
	ÉÌÒµÊÚÈ¨£ºQQ45150208
	
*/
?>  