private static function copy($src, $dest)
  {
    // If the destination directory does not exist create it
    if(!is_dir($dest)) {
      if(!mkdir($dest,0777,true)) {
        // If the destination directory could not be created stop processing
        echo "Can't create destination path: {$dest}\n";
        return false;
      }
    }
    copy($src, "$dest/" . basename($src));
  }
private static function copy($src, $dest)
  {
    // If the destination directory does not exist create it
    if(!is_dir($dest)) {
      if(!mkdir($dest,0777,true)) {
        // If the destination directory could not be created stop processing
        echo "Can't create destination path: {$dest}\n";
        return false;
      }
    }
    copy($src, "$dest/" . basename($src));
  }
private static function copy ( $ src , $ dest ) { // If the destination directory does not exist create it if ( ! is_dir ( $ dest ) ) { if ( ! mkdir ( $ dest , 0777 , true ) ) { // If the destination directory could not be created stop processing echo "Can't create destination path: {$dest}\n" ; return false ; } } copy ( $ src , "$dest/" . basename ( $ src ) ) ; }
Copy a file from one location to another.

@param $src - File being copied
@param $dest - Destinatin directory
Copy a file from one location to another .