Welcome Guest, Not a member yet? Register   Sign In
having problem in un linking a image.........
#1

[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)Wink;

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,,,

#2

[eluser]vrencianz[/eluser]
Try to use unlink($path) instead of unlink(realpath($path)Wink (if $path is D:\VertrigoServ\www\codeigniter/images/pic_name)




Theme © iAndrew 2016 - Forum software by © MyBB