Last updated on October 11, 2014
Today i will show you how to copy file from one folder to another or same folder.We can easily create a copy or duplicate file to original in PHP with PHP’s built in function called copy().It requires two arguments to perform its operation, the source file to copy, and the destination file path. it will return TRUE on Success and FALSE on failure.
NOTE: If the destination file already exists, it will be overwritten.
Example Script :
That’s it