nibbo Posted January 6, 2008 Share Posted January 6, 2008 ignore me I was an idiot! :'( Quote Link to comment https://forums.phpfreaks.com/topic/84750-solved-is_uploaded_files-always-returns-true/ Share on other sites More sharing options...
papaface Posted January 6, 2008 Share Posted January 6, 2008 You have the statements mixed up. If (is_uploaded_file($_FILES['UserFile']['tmp_name'])) { If the file is uploaded then that will turn true. Therefore your code should be: If (is_uploaded_file($_FILES['UserFile']['tmp_name'])) { echo "returned true"; copy('/images/noimage.gif' , $NewImageName); } else { echo "returned false"; move_uploaded_file($_FILES["UserFile"]["tmp_name"], $NewImageName); } Quote Link to comment https://forums.phpfreaks.com/topic/84750-solved-is_uploaded_files-always-returns-true/#findComment-431877 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.