jeff5656 Posted September 13, 2012 Share Posted September 13, 2012 I am trying to upload a file that a user chose from a form. However, when I look in that directory, the file is not there. Although I have error_reporting(E_ALL), I am not getting any errors - just the file is not there. Is there anything wrong with my code: move_uploaded_file($_FILES['imagefile']['tmp_name'], $_FILES['imagefile']['name']); I assume that with the above code, the file should appear in the same directory. or does it have to do with the permission of that directory. It is set at 705. I don't think godaddy (no jokes please) allows me to go to 777 (just to test it). Quote Link to comment https://forums.phpfreaks.com/topic/268344-uploading-a-file/ Share on other sites More sharing options...
jeff5656 Posted September 13, 2012 Author Share Posted September 13, 2012 When I added this: echo "error is ". $_FILES['imagefile']['error']; I got error is 2 I think that error means maximum file size? But this file is only 1.8 megs and the godaddy limit is 8 megs so I dont know what the deal is here... Quote Link to comment https://forums.phpfreaks.com/topic/268344-uploading-a-file/#findComment-1377740 Share on other sites More sharing options...
PFMaBiSmAd Posted September 13, 2012 Share Posted September 13, 2012 http://us3.php.net/manual/en/features.file-upload.errors.php Quote Link to comment https://forums.phpfreaks.com/topic/268344-uploading-a-file/#findComment-1377742 Share on other sites More sharing options...
jeff5656 Posted September 14, 2012 Author Share Posted September 14, 2012 Thanks for the link. That was the problem. Quote Link to comment https://forums.phpfreaks.com/topic/268344-uploading-a-file/#findComment-1378027 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.