ylkien Posted January 18, 2007 Share Posted January 18, 2007 Hi,I am having problems with checking this. It returns TRUE all the time. My code is below.Does anyone know how to NULL the $_FILES['filename']['name'] ? That means making it to NULL (empty). I tried "$_FILES['filename']['name'] = NULL" but no effect.[code]if( is_uploaded_file($_FILES['Picture']['tmp_name']) ){ $Target_Path = $_SERVER['DOCUMENT_ROOT'] . "/"; $Target_Path = $Target_Path . basename( $_FILES['Picture']['name']); if(move_uploaded_file($_FILES['Picture']['tmp_name'], $Target_Path)) { echo "The file ". basename( $_FILES['Picture']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; }}[/code]Thanks Link to comment https://forums.phpfreaks.com/topic/34711-is_uploaded_file-check-not-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.