how to copy a file from one folder to another with php?

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

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.