I want to create a <form> where users can upload images (.gif and .jpg) to a specified dir on my windows2000 server.
The copy() function does not seem to work on Windows systems... The image gets copied to my servers temp dir but from there I'm unable to copy it to my dir..
I use PHP4 and yes the dir is CHMOD 777..
Please help! /mattek
Do you have right slashes? probably bad idea is to copy like copy("/tmp/$filename","$mydir/$filename") so you have to use backslash - copy("\tmp\$filename","mydir\$filename); even helps to echo return code of copy command: if (!($retcode=copy(...))) { echo "something gets wrong ($retcode)"; }
if $retcode == 2 (No such file or directory) || if $retcode == 13 (Permission denied)
J don't try it, but J think:
one backslash not blackslash!!
copy("\tmp\$filename","mydir\$filename); (bad) copy("\tmp\$filename","mydir\$filename); (good)