I am not an experienced php programmer. I am trying to make an uploader for my website. I found some copy and paste php code online. It gave my directions to make an uploader. Right now I have a form that gives upload.php their data. I've tried my uploader. My browser says: Parse error: syntax error, unexpected ',' in C:\Program Files\Abyss Web Server\htdocs\Start\upload\upload.php on line 7 My php code is: <?php $target = "/Stuart"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; //This is our size condition if ($uploaded_size > 1,000,000) { echo "Tutu, Your file is too large. You might be a Hacker!.<br>"; $ok=0; } //Here we check that $ok was not set to 0 by an error if ($ok==0) { Echo "Sorry your file was not uploaded"; } //If everything is ok we try to upload it else { if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "Your File has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } } ?> Does anyone have any Ideas?
I still have some trouble. It'll say that it works. But it won't put the file in /Stuart should I use backslashes? Should I put a slash after it?
I have another problem. My browser says: Warning: move_uploaded_file(/Stuart/Najisitetemp.htm) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Program Files\Abyss Web Server\htdocs\Start\upload\upload.php on line 23 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Documents and Settings\Peg Stu and Naji\Local Settings\Temp\php485.tmp' to '/Stuart/Najisitetemp.htm' in C:\Program Files\Abyss Web Server\htdocs\Start\upload\upload.php on line 23 Sorry, there was a problem uploading your file.