0
폴더에 이미지를 추가 할 수 없습니다. 이유를 모르겠습니다. 내 루트 폴더 안에 고객 폴더가 있습니다. 도움이 필요합니다.codeigniter에 이미지 폴더를 업로드 할 수 없습니다.
function add_new_successfully(){
$config['upload_path'] = site_url().'customer/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$this->load->library('upload',$config);
$this->upload->do_upload('userfile');
$data['customer_name'] = $this->input->post('c_name');
$data['customer_email'] = $this->input->post('c_email');
$data['customer_pass'] = $this->input->post('c_pass');
$data['customer_country'] = $this->input->post('c_country');
$data['customer_city'] = $this->input->post('c_city');
$data['customer_contact'] = $this->input->post('c_contact');
$data['customer_address'] = $this->input->post('c_address');
$data['customer_image'] = $_FILES['userfile']['name'];
$this->common_model->insert('customers',$data);
$this->session->set_flashdata('page_added','<div class="n_ok"><p>Customer added</p></div>');
redirect($_SERVER['HTTP_REFERER']);
}
내 세부 정보는 데이터베이스에 업로드되지만 폴더는 변경되지 않습니다 ... $ config [ 'upload_path'] = site_url(). 'customer /'; $ config [ 'upload_path'] = FCPATH.'customer/'; 그러나 같은 문제 .... @ Tpjka –
'upload_path'를 하나 변경하십시오. 나는 당신에게 제안했고 어떤 차이점이 있는지 말해줍니다. – Tpojka
감사합니다 지금 작동 중입니다 ........ @ Tpojka –