[eluser]dadamssg[/eluser]
I'm trying to delete/unlink a file. I don't know if the error is being cause by codeigniter or not. I don't know if codigniter has its own unlink function. I couldn't find one.
I'm getting this error:
A PHP Error was encountered
Severity: Warning
Message: unlink() [function.unlink]: http does not allow unlinking
Filename: controllers/slideshows.php
Line Number: 151
anybody have any suggestions?
edit for more information:
i'm using this to upload and its working. --- $config['upload_path'] = './photos/';
and i've tried this
Code:
$photo = $this->photos_model->get_photo($photo_id);
$photo_name = $photo['name'];
$file = "./photos/$photo_name";
//delete file from directory
unlink($file);
but i'm getting this errror
A PHP Error was encountered
Severity: Warning
Message: unlink(./photos/10_1311449383_2.jpg) [function.unlink]: No such file or directory
Filename: controllers/slideshows.php
Line Number: 152
i don't think i'm referencing the directory right...