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 608 views
608 views asked Mar 15, 2015 by avibootz
1 answer 314 views
1 answer 305 views
305 views asked Nov 1, 2014 by avibootz
1 answer 265 views
2 answers 374 views
...