The second argument to copy() function cannot be a directory
<p>Anyone know why this:</p>

<pre><code>&lt;?PHP
$title = trim($_POST['title']);
$description = trim($_POST['description']);

// Array of allowed image file formats 
$allowedExtensions = array('jpeg', 'jpg', 'jfif', 'png', 'gif', 'bmp');

foreach ($_FILES as $file) {
  if ($file['tmp_name'] &gt; '') {
    if (!in_array(end(explode(".",
            strtolower($file['name']))),
            $allowedExtensions)) {
      echo '&lt;div class="error"&gt;Invalid file type.&lt;/div&gt;';
    }
  }
}

if (strlen($title) &lt; 3)
  echo '&lt;div class="error"&gt;Too short title&lt;/div&gt;';
else if (strlen($description) &gt; 70)
  echo '&lt;div class="error"&gt;Too long desccription.&lt;/div&gt;';

else {
  move_uploaded_file($_FILES['userfile']['tmp_name'], 'c:\wamp\www\uploads\images/');
}
</code></pre>

<p>Gives:</p>

<blockquote>Warning: move_uploaded_file() [function.move-uploaded-file]: The second argument to copy() function cannot be a directory in C:\wamp\www\upload.php on line 41</blockquote>

<blockquote>Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wamp\tmp\php1AB.tmp' to 'c:\wamp\www\uploads\images/' in C:\wamp\www\upload.php on line 41</blockquote>
