Techmate Posted August 7, 2011 Share Posted August 7, 2011 I have been working on this for few hours now and can not figure out why my files will not show up in the directory is there something wrong with my tmp subdirectory? It is chmod 777. When I look in the tmp directory the temp file doesn't exists. Can someone help me please? <?php if($_POST[upload] == "1"){ $mydirect = "uploads/" . $_FILES['file']['name']; move_uploaded_file($_FILES['file']['tmp_name'], $mydirect); echo "uploaded"; } ?> <form method ="POST" enctype="multipart/form-data"> <input type="hidden" name="upload" value="1"> <input type="file" name="file"> <input type="submit" value="Watermark"> </form> Link to comment https://forums.phpfreaks.com/topic/244078-move_uploaded_file-not-working/ Share on other sites More sharing options...
WebStyles Posted August 7, 2011 Share Posted August 7, 2011 check your uploads folder permissions. Link to comment https://forums.phpfreaks.com/topic/244078-move_uploaded_file-not-working/#findComment-1253542 Share on other sites More sharing options...
Techmate Posted August 7, 2011 Author Share Posted August 7, 2011 check your uploads folder permissions. Wow I tried that 5 times before you typed it as you can see in my post. Then I tried it one more time and Lo and behold it worked! Wow... Thank you ! Link to comment https://forums.phpfreaks.com/topic/244078-move_uploaded_file-not-working/#findComment-1253554 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.