title: fopen(uploadedimages/): failed to open stream: No such file or directory in
body: <p>I'm following a tutorial to upload a picture from android to server and i'm using php on server side and this is the code:</p>
  
  <pre><code>&lt;?php
      error_get_last();
      chmod("./uploadedimages/", 777);
      // Get image string posted from Android App
      $base=$_REQUEST['image'];
      // Get file name posted from Android App
      $filename = $_REQUEST['filename'];
      // Decode Image
      $binary=base64_decode($base);
      header('Content-Type: bitmap; charset=utf-8');
      // Images will be saved under 'www/imgupload/uplodedimages' folder
      $file = fopen('uploadedimages/'.$filename, 'wb');
      // Create File
      fwrite($file, $binary);
      fclose($file);
      echo 'Image upload complete, Please check your php file directory';
  ?&gt;
  </code></pre>
  
  <p>When i try to run, it shows me the following errors:</p>
  
  <blockquote>
    <p>fopen(uploadedimages/): failed to open stream: No such file or
    directory in...</p>
    
    <p>fwrite() expects parameter 1 to be resource, boolean given in...
    fclose() expects parameter 1 to be resource, boolean given in...</p>
  </blockquote>
  
  <p>I'm very new to php so please help me ( I've found some answers from the internet but it didn't work for me)</p>