PHP Programming quiz, level Advanced, question 3
| Question: | What's the best way to copy a file from within a piece of PHP? |
| Answer 1: | Use the built in copy() function This was the CORRECT answer |
| Answer 2: | Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero |
| Answer 3: | Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows) |
| Answer 4: | Print out a message asking your user to "telnet" in to the server and copy the file for you |
This was a question from our quiz ... but we have now provided you with
the answer (above) - we prefer to provide you with information rather than to
puzzle you.
|
|