jwk811 Posted April 3, 2010 Share Posted April 3, 2010 most of the time it works but then a few people couldnt get their photos to upload. im stumped. i think it has something to do with the extension in capital letters instead. but i tried a photo like that and it worked fine. ahhh help please $pic = $_FILES['photo']; $ext = substr(strrchr($pic['name'], "."), 1); $imagePath = md5(rand() * time()) . ".$ext"; $target = "images/"; $target = $target . $imagePath; move_uploaded_file($pic['tmp_name'], $target); Link to comment https://forums.phpfreaks.com/topic/197490-move-photo-to-directory-not-working/ Share on other sites More sharing options...
Lukeidiot Posted April 3, 2010 Share Posted April 3, 2010 Make sure you CHMOD the dir. CHMOD: 777 Link to comment https://forums.phpfreaks.com/topic/197490-move-photo-to-directory-not-working/#findComment-1036553 Share on other sites More sharing options...
jwk811 Posted April 3, 2010 Author Share Posted April 3, 2010 ok i did that. but why would it work for some people. i dont get it. Link to comment https://forums.phpfreaks.com/topic/197490-move-photo-to-directory-not-working/#findComment-1036557 Share on other sites More sharing options...
jwk811 Posted April 3, 2010 Author Share Posted April 3, 2010 thts not it Link to comment https://forums.phpfreaks.com/topic/197490-move-photo-to-directory-not-working/#findComment-1036560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.