title: unlink() not working while I try to remove an image PHP
body: <p>I am trying to remove an image from a directory using the <code>unlink()</code> function.</p>
  
  <pre><code>if (file_exists($oldPicture)) {
      unlink($oldPicture);
      echo 'Deleted old image';
  } 
  else {
      echo 'Image file does not exist';
  }
  </code></pre>
  
  <p>The value of <code>$oldPicture</code> is <code>../images/50/56/picture.jpg</code>. </p>
  
  <p>The follow block of code runs without any errors however when I check the directory the image is still there.</p>
  
  <p>Am I doing something wrong here?</p>
  
  <p>Thanks</p>