i have this code :
$this->load->library('form_validation'); $this->form_validation->set_rules($this->credit_rules);
$this->load->model('profile_m');
$this->load->model('order_m');
$config['upload_path'] = './uploads/user/';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '2048';
$config['max_width'] = '2650';
$config['max_height'] = '2270';
$config['overwrite'] = FALSE;
$config['encrypt_name'] = FALSE;
$this->load->library('upload',$config);
if ( ! $this->upload->do_upload('ktp') )
{
$this->data->error = $this->upload->display_errors();
// $this->load->view('upload_form', $error);
}
else
{
$data = array('upload_ktp' => $this->upload->data());
// $this->load->view('upload_success', $data);
}
no warning / error appear, submit success but the image which i upload not show up on the folder './uploads/user/' i wonder why, i don't know how to check my upload_path is right or not. i wish for some direction. but i do upload from the different function with a same code it's working and the image show up.
i currently use localhost.
this is the form :
<?php if($this->session->flashdata('pesan')): ?>
<?php echo $this->session->flashdata('pesan'); ?>
<?php else:?>
<?php if(@$error){echo @$error;} ?>
<?php echo validation_errors(); ?>
<?php
echo form_open_multipart(site_url(uri_string()));
echo form_label('KTP');
echo form_upload('ktp');
echo form_submit('submit','Pesan Sekarang');
?>