| 제목 | 각각의 폴더에 파일업로드를 하고싶습니다. | ||
|---|---|---|---|
| 글쓴이 | 초보개발자J | 작성시각 | 2015/01/13 13:44:00 |
|
|
|||
$post_array = $this->input->post();
$img_url_array = array(); //썸네일이미지 정보
$img_url2_array = array(); //상세이미지 정보
$config['upload_path'] = './img/m_coupon/thum/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '10000';
$config['remove_spaces'] = true;
$config['encrypt_name'] = true;
$this->load->library('upload', $config);
//썸네일
if ( ! $this->upload->do_upload("img_url") ){
exit("이미지업로드 실패!_1".print_r($this->upload->display_errors()));
}else{
$img_url_array = $this->upload->data();
}
$config['upload_path'] = './img/m_coupon/square/'; //경로변경
$this->load->library('upload', $config);
//상세이미지
if ( ! $this->upload->do_upload("img_url2")){
exit("이미지업로드 실패!_2".print_r($this->upload->display_errors()));
}else{
$img_url2_array = $this->upload->data();
}
위에 코드를 실했했을시에 첫번째 config에 설정한 upload_path로 두개의 파일이 다 전송되어버립니다..각각의 폴더에 업로드 할수있는 방법이 없을까요 ㅠㅠ... 도무지 제 머리론 생각이 안나네요.. |
|||
| 태그 | 파일업로드,파일,다중파일업로드,각각의폴더 | ||
| 다음글 | [ODBC] 다른 hstmt의 결과에 연결이 사용 중... (1) | ||
| 이전글 | form_error 문의 드립니다. (2) | ||
|
초보개발자J
/
2015/01/15 10:11:25 /
추천
0
|
$this->upload->initialize($config); 호출해서 같은효과를 볼수있다.