unlink image file in Codeigniter, while delete user records from the database.
Use this code:
@unlink(".$image_path".$image_value'));
For example:
<?php $image_path="/assets/upload/images/"; @unlink(".$image_path".$this->input->post('hidden_image')); ?>
or you can use image path directly in your code. Try it:
<?php @unlink("./assets/upload/images/".$this->input->post('hidden_image')); ?>
Question and answer is powered by AnsPress.io