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 391 views
391 views asked Mar 15, 2015 by avibootz
1 answer 193 views
1 answer 210 views
210 views asked Nov 1, 2014 by avibootz
1 answer 187 views
1 answer 160 views
...