Hi, I have a simple php upload script. Works like a charm on local computer. When I put the files online, the script doesn't work anymore.The wierd thing is that the $_FILES['uploaded']['error'] variable shows 0 value. As far as I remember, 0 means file was uploaded succesfully. the code is pretty basic: if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {print("success"); } else {echo $_FILES['uploaded']['error']; echo "Sorry, there was a problem uploading your file: !";} Code (markup): so when I try to upload the file I get 0 Sorry, there was a problem uploading your file: ! is there any way I can find out what can be the problem? I tried printing mysql_error() but doesn't return anythig. Is there another way I can find out what is the problem? 10x in advance
well based on the snippet you pasted $_FILES['uploaded']['error'] is not where you are going to find your issue.... if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) would be your issue... i assume either $target path does not exist or you do not have permissions to upload to that folder.