Hello, I have a very simple script and am not interested in security. That being said, I cannot get it to work and I was wondering if you good people could help me find out why. I am an amateur as I am sure you all can tell so please be gentle Form.php HTML: <form enctype="multipart/form-data" action="uploader.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> Uploader.php php: <html> <head> <title>Untitled</title> </head> <body> <? $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?> </body> </html> I copied this verbatim from one of the tutorials so I am not trying to claim this as my own but I cannot get it to work. The only message I get after trying to upload is the "There was an error..." message. Any help is appreciated. Thanks in advance.
What are the permissions of the upload directory? Is PHP allowed to write to it? And I know you said you don't care about security... but honestly, do not use this anywhere in public.
The directory is public. Isn't that the same as writable? There is no private info being shared with this site, so I am not concerned with security. How can I find out if PHP can wrote to the directory?