Copy File
function copyFile($url,$dirname){
@$file = fopen ($url, "rb");
if (!$file) {
// echo"Failed to copy $url!
";
return false;
}else {
$filename = basename($url);
$fc = fopen($dirname."$filename", "wb");
while (!feof ($file)) {
$line = fread ($file, 1028);
fwrite($fc,$line);
}
fclose($fc);
//echo "File $url saved to PC!
";
return true;
}
}
copyFile("../".$dir_path,"../".$dir_path1);
@$file = fopen ($url, "rb");
if (!$file) {
// echo"Failed to copy $url!
";
return false;
}else {
$filename = basename($url);
$fc = fopen($dirname."$filename", "wb");
while (!feof ($file)) {
$line = fread ($file, 1028);
fwrite($fc,$line);
}
fclose($fc);
//echo "File $url saved to PC!
";
return true;
}
}
copyFile("../".$dir_path,"../".$dir_path1);