PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Every time i try to upload a file i get Error: A problem occurred during file upload!
Now the funny thing is... it works fine locally on my Windows XP machine but when i try to run it on a Linux machine it gives me the error message.
And one more thing:
I'm planning on having this run on a subdomain. Is it possible to have the files uploaded into a /img/ folder on the main domain name???
Thanks for your time guys and hope someone is willing to shed some light for me...
if (move_uploaded_file($_FILES['file']['tmp_name'] , "img/" . basename($_FILES["file"]["name"]))) {
removed the / in front of the img folder and chmod 777 the folder on the server.
is this secured???? 755 didnt work.
How do i make the upload put the file on the main domainname???
i tried http://domainname.com/img/ and it didnt work.
the script is currently running on a subdomain name