I'm having problems with my "uploader". The problem is that it's not uploading. I get this error:
Warning: Unable to open 'C:\\WINDOWS\\Desktop\\dude.JPG' for reading: No such file or directory in /home/chatterspics/public_html/register/index.php on line 158
And my code is:
Anyone got any ideas on how to do it? I've looked at php.net but I got confused and more lost than I am now.
Warning: Unable to open 'C:\\WINDOWS\\Desktop\\dude.JPG' for reading: No such file or directory in /home/chatterspics/public_html/register/index.php on line 158
And my code is:
PHP Code:
if ($photo != "")
{
// copy the file from the temporary upload position to where you want it
copy($photo, "../users/$username/$username.gif") or die("<b>Error:</b> could not copy file.");
// tell them it worked
echo "";
}
else
{
// tell them to browse for a file
copy("nophoto.gif", "../users/$username/$username.gif");
echo "You must select a file to upload. If there was an error, please email [email][email protected][/email] with your photo, stating your username and password";
}
Comment