Checking for the existence of an uploaded file : is_uploaded_file « Form « PHP






Checking for the existence of an uploaded file

 
<?php

if (!is_uploaded_file($HTTP_POST_FILES['upload_file']['tmp_name'])) {
    $error = "You must upload a file!";
    unlink($HTTP_POST_FILES['upload_file']['tmp_name']);
}
else {
    
}

?>
  
  








Related examples in the same category

1.Uploading a file