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);

POPULAR POSTS ::

Add multiple upload box

The top Web development PHP frameworks

String Separation

Mobile App Development Trends: Emerging Technologies and Innovations

React Native iOS and Android App Development

Only number restrictions