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