title: move_uploaded_file(uploads/) [function.move-uploaded-file]: failed to open stream: Permission denied
body: <p>I have this code : <br></p>
  
  <pre><code>chmod('uploads', 0777);
  $image = $_FILES['image']['tmp_name'];
  $_FILES['image']['name'] =   date('d-m-Y_H-i-s-') . rand(11111,99999) * rand(99999,11111) . rand(111,999) . $_FILES['image']['tmp_name'];
  </code></pre>
  
  <p>and this : <br></p>
  
  <pre><code>move_uploaded_file($_FILES['image']['tmp_name'], 'uploads/');
  </code></pre>
  
  <p>but when I run the code I get this error message:</p>
  
  <blockquote>
    <p>Warning: move_uploaded_file(uploads/) [function.move-uploaded-file]:
    failed to open stream: Permission denied in
    D:\AppServ\www\tab\submit.php on line 51</p>
    
    <p>Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
    move 'C:\Windows\Temp\php4D3.tmp' to 'uploads/' in
    D:\AppServ\www\tab\submit.php on line 51</p>
  </blockquote>
  
  <p>How to fix it??</p>