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 410 views
410 views asked Mar 15, 2015 by avibootz
1 answer 206 views
1 answer 218 views
218 views asked Nov 1, 2014 by avibootz
1 answer 171 views
2 answers 252 views
...