title: How can I debug problems with move_uploaded_file?
body: <p>I have a form like</p>
  
  <pre><code>&lt;form action="send.php" method="post" enctype="multipart/form-data"&gt;
      &lt;div&gt;
          &lt;label for="subject"&gt;Subject&lt;/label&gt;
          &lt;input type="text" name="subject" /&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;label for="image"&gt;Image&lt;/label&gt;
          &lt;input type="file" name="image" /&gt;
      &lt;/div&gt;
      &lt;input type="submit" value="Send" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP like</p>
  
  <pre><code>echo '&lt;pre&gt;'; print_r($_FILES); echo '&lt;/pre&gt;';
  if (move_uploaded_file($_FILES['image']['tmp_name'], 'images/' . $_FILES['image']['name'])) {
      echo 'ok';
  } else {
      echo 'error!';
  };
  </code></pre>
  
  <p>I keep getting <code>error</code> the print_r looks like</p>
  
  <pre><code>Array
  (
      [image] =&gt; Array
          (
              [name] =&gt; Untitled-1.jpg
              [type] =&gt; image/jpeg
              [tmp_name] =&gt; /tmp/phpprWdjN
              [error] =&gt; 0
              [size] =&gt; 61768
          )
  
  )
  </code></pre>