having problem in un linking a image......... - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: having problem in un linking a image......... (/showthread.php?tid=50651) |
having problem in un linking a image......... - El Forum - 04-03-2012 [eluser]meer[/eluser] im using the unlink an image bt its not working getting the error as Severity: Warning Message: unlink() [function.unlink]: Invalid argument Filename: controllers/admin_controller.php Line Number: 94 im using the following code ........ controller,,, function delete_images($id) { $query=$this->db->get_where('add_images', array('id'=>$id)); ; foreach($query->result() as $row) { $path = $row->fullpath; unlink(realpath($path); return TRUE; } if im echoing the $path , its giving the full path D:\VertrigoServ\www\codeigniter/images/pic_name bt not working in the unlink function help me plzzzzzzz....... i have got fullstop due to this issue,,, having problem in un linking a image......... - El Forum - 04-16-2012 [eluser]vrencianz[/eluser] Try to use unlink($path) instead of unlink(realpath($path) (if $path is D:\VertrigoServ\www\codeigniter/images/pic_name) |