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 Quote Link to comment 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.