Codeigniter Code:
if(is_dir('uploads/'.$data['pet'][0]['pet_hidenum'])){
if(isset($this->input->post('lostimage1'))){
$filedata = explode(',', $this->input->post('lostimage1'));
$pos = strpos($this->input->post('lostimage1'), ';');
$type = explode(':', substr($this->input->post('lostimage1'), 0, $pos))[1];
$type = '.'.$type;
$type = str_replace('image/', '', $type);
$img['img'] = $img['img'].''.$type;
write_file('./uploads/'.$data['pet'][0]['pet_hidenum'].'/'.$img['img'], base64_decode($filedata[1]));
}
}
Why is this error appearing van anyone p[lease help me how can I resolve this problem?