Skip to content

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

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

5 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments