nibbo Posted January 6, 2008 Share Posted January 6, 2008 ignore me I was an idiot! :'( 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); } 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
Archived
This topic is now archived and is closed to further replies.