title: Error moving uploaded file php
body: <p>I try to add image loading to my site, but it gives me error. Here's result of working php:</p>
  
  <blockquote>
    <p>C:\Users\Admin\AppData\Local\Temp\php9664.tmp
    Warning: move_uploaded_file(/img/collection/usbwebserver.exe): failed to open stream: No such file or directory in D:\Home\Volodya\Projects\Web\CollectionSite\site\php\collection.php on line 26</p>
    
    <p>Warning: move_uploaded_file(): Unable to move 'C:\Users\Admin\AppData\Local\Temp\php9664.tmp' to '/img/collection/usbwebserver.exe' in D:\Home\Volodya\Projects\Web\CollectionSite\site\php\collection.php on line 26</p>
  </blockquote>
  
  <p>Her's my code:
  a form:</p>
  
  <pre><code>echo ('
      &lt;form action="collection.php" method="post" enctype="multipart/form-data"&gt;
          &lt;legend&gt;Add coin&lt;/legend&gt;
          &lt;select name="countryId"&gt;
  ');     
  
  if(mysqli_num_rows($resultCountry)&gt;0) {
      while($row=mysqli_fetch_assoc($resultCountry)) {
          echo("&lt;option value=".$row['country_id']."&gt;".$row['country_name']."&lt;/option&gt;");
      }
  }
  
  echo('
          &lt;/select&gt;
          &lt;select name="curencyId"&gt;
  ');
  
  if(mysqli_num_rows($resultCurency)&gt;0) {
      while($row=mysqli_fetch_assoc($resultCurency)) {
          echo("
              &lt;option value=".$row['curency_id']."&gt;".$row['curency_name']."&lt;/option&gt;
          ");
      }
  }
  
  echo('
      &lt;/select&gt;
      &lt;select name="metalId"&gt;
  ');
  
  if(mysqli_num_rows($resultMetal)&gt;0) {
      while($row=mysqli_fetch_assoc($resultMetal)) {
          echo("
              &lt;option value=".$row['metal_id']."&gt;".$row['metal_name']."&lt;/option&gt;
          ");
      }
  }
  
  echo('
          &lt;/select&gt;
          &lt;select name="nominalId"&gt;
  ');
  
  if(mysqli_num_rows($resultNominal)&gt;0) {
      while($row=mysqli_fetch_assoc($resultNominal)) {
          echo("
              &lt;option value=".$row['nominal_id']."&gt;".$row['nominal_name']."&lt;/option&gt;
          ");
      }
  }
  
  echo('
          &lt;/select&gt;
          &lt;input type="date" name="dateCreation"&gt;
          &lt;input type="number" name="weight"&gt;
          &lt;input type="number" name="mintage"&gt;
          &lt;input type="file" name="img"&gt;
          &lt;input type="hidden" name="type" value="addcoin"&gt;
          &lt;input type="submit" value="Add coin"&gt;
      &lt;/form&gt;               
  ');
  </code></pre>
  
  <p>And a code of coping files:</p>
  
  <pre><code>echo($_FILES['img']['tmp_name']);
  move_uploaded_file($_FILES['img']['tmp_name'], "/img/collection/".basename($_FILES['img']['name']));
  </code></pre>