This is where it get’s interesting.
The copy command that gets sent to php is
[php]
copy(C:WINDOWSTEMPphp774.tmp,/images/00120032.jpg)
[/php]
However the backslashes are the “Escape” character for php. Thus the above is seen broken up because the W, T and p (escape W, escape T and escape p respectively) I am not sure if they are at all legitimate escape sequences, but nonetheless, it’s a problem. Therefore you would need to modify the copy command so that it’s more like this:
[php]
copy(C:\WINDOWS\TEMP\php774.tmp,/images/00120032.jpg)
[/php]
The that’s because to represent a literal backslash, it’s escape sequence is \ (escape backslash). I hope it makes sense.
Now you can do that a couple of ways, like using regular expresions. I just use str_replace.
[php]
$userfile = str_replace("","\", $userfile);
[/php]
Your next problem is that you trying to copy from a windows style folder C:WINDOWSTEMPphp774.tmp to a *nix style folder /images/00120032.jpg
I don’t believe that will work. You need to be consistent. Since you are on a “Windows” server, you destination should probably be more like c:\inetpub\wwwroot\MyDir\images\00120032.jpg or whatever the appropriate path for you is, but I think you can see my point.