Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

How to Copy file from one folder to another folder using PHP

by
Category:php
php php string
How to Copy file from one folder to another folder using PHP

To copy files from source folder to destination php provide a copy function. This function takes two argument first is source path (source dir) and destination path (destination dir) and copy files from source to destination path. You may also like How to rename file using PHP and How to get file size in PHP

Code

$source = 'source/apple.png';
$destination = 'destination/apple.png';
copy($source, $destination);

0 Comments


Html code work in comment box


Related Post