i want to delete my pdf file from server. my controller function looks like

```
function delete_pdf()
{
  $id = (isset($_GET['id']) && $_GET['id']!='')?$_GET['id']:'1';  
  $user_email = $this->session->userdata('user_email');
  $file = site_url('pdf files/'.$user_email.'/pdf #'. $id.'.pdf');
  unlink($file);
}

```

when i `echo $file;`, it gives url `http://localhost/my_site/pdf files/developer_team@gmail.com/pdf #4.pdf` but the function not working to delete the pdf file. 

I would appreciate for any help where i can delete my pdf files from server. thank you.