title: PHP test if form has file uploaded
body: <p>How do I do it? These don't work:</p>
  
  <pre><code>if(empty($_FILES)){
    echo "there is no file uploaded";
    exit;
  } else {
    echo "there is file";
  }
  
  if(sizeof($_FILES)!=0){
    echo "there is file";
  } else {
    echo "there is no file";
  }
  </code></pre>