Temelde bir proje tabanlı dosya upload olabilir. Ben bir proje oluşturduğunuzda, yeni bir dizin proje_adı örneğin gibi dizin adı ile oluşturulan > bu-is-a-testi - bu bir testtir. Ama benim sorunum ben bir dizinde bir dosyayı silmek açamadı.
function delete_image($id)
{
$this->load->model(array('work_model', 'project_model'));
$result = $this->work_model->get_work($id);
$result = $this->project_model->get_project($result->project_id);
$dir = str_replace(" ", "-", $result->project_name);
$result = $this->work_model->delete($id);
if (isset($result)){
unlink('./uploads/' . $dir . '/' . $result->full_path);
}
redirect('admin/project/view_project/' . $result->project_id);
}
Bu sayesinde yardıma ihtiyacım var.