title: deleting a image file yii
body: <p>can any one pls tell me how to delete an image file and directory in yii</p>
  
  <p>I have tried unlink but its not working.(the path is correct but its not deleting) but getting the error <strong>No such file or directory</strong></p>
  
  <pre><code>unlink(Yii::app()-&gt;request-&gt;baseUrl.'/uploads/'.$model-&gt;file_id.'/'.$fileModel-&gt;file_name.$fileModel-&gt;extension);
  </code></pre>
  
  <ul>
  <li><p>and I also need to delete a directory in yii framework.the path is
  correct but its not deleting</p>
  
  <p>rmdir(Yii::app()->request->baseUrl.'/uploads/'.$model->file_id);</p></li>
  </ul>
  
  <p>This is not working either, but getting the error <strong>No such file or directory</strong>.</p>