The upload destination folder does not appear to be writable.

dimana yang salah gan? persaan bener aja dah

public function proses_edit()
    {

        $email = $this->input->post('email');
        $name = $this->input->post('name');
        $uploadImg = $_FILES['image']['name'];

        if ($uploadImg) {
            $config['allowed_types'] = 'jpg|gif|png';
            $config['max_size']      = 2048;
            $config['max_width']     = 2048;
            $config['max_height']    = 2048;
            $config['upload_path']   = './assets/img/profile/';

            $this->load->library('upload', $config);

            if ($this->upload->do_upload('image')) {

                $newImg = $this->upload->data('file_name');
                $this->db->set('image', $newImg);
            } else {
                $this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">' . $this->upload->display_errors() . '</div>');
            }
        }
        $this->db->set('name', $name);
        $this->db->where('email', $email);
        $this->db->update('user');
        $this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Congrats bout your new profile yo!</div>');
        redirect('home');
    }

avatar werich1
@werich1

89 Kontribusi 7 Poin

Dipost 4 tahun yang lalu

1 Jawaban:

Jawaban Terpilih

harus di chmod karena gua pake linux wkwk

avatar werich1
@werich1

89 Kontribusi 7 Poin

Dipost 4 tahun yang lalu

Login untuk ikut Jawaban