I have been trying to upload multiple images using codeigniter file uploading library. Everything is working except it's not saving the images in directory, I have check permissions everything is perfect. I have also tried changing package but still face same issue.
This is my code for uploading.
$count = count($_FILES['upload_' . $increment]['size']);
for ($s = 0; $s <= $count-1; $s++) {
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '10000';
$config['max_width'] = '2048';
$config['max_height'] = '1152';
$image = $config['file_name'] = $c_id . '-' . $s . '.jpg';
$this->load->library('upload', $config);
$this->upload->initialize($config);
$this->upload->do_upload();
$data = $this->upload->data();
$data = array('c_id' => $c_id, 'image'=> $image);
$this->db->insert('images', $data);
}
$increment++;