How to copy a file to another location in PHP

1 Answer

0 votes
if (!copy("e:/temp.txt", "e:/test/temp.txt"))
    echo "Error copy file";
else if (file_exists("e:/test/temp.txt"))
         echo "file exists copy succeed";

    
/*
run:

file exists copy succeed

*/

 



answered Dec 8, 2015 by avibootz

Related questions

4 answers 405 views
405 views asked Mar 15, 2015 by avibootz
1 answer 199 views
1 answer 216 views
216 views asked Nov 1, 2014 by avibootz
1 answer 167 views
2 answers 250 views
...