Greetings
The way you had it before relied on an external program, which was called as a system function. The method I have above uses php's build in copy function.
So, anyone using windows nt, 2000, etc. etc. or any other OS that doesn't have the cp function built in, will be able to use the method above.
You might want to change it in your base code as well, since calling external system functions from PHP can lead to security problems on some OSs (buffer over flows, escape characters, etc. etc.)
|