CI 묻고 답하기

제목 업로드 질문드립니다~ ㅠㅠ
글쓴이 미갱 작성시각 2011/11/28 19:23:34
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 15849   RSS
<뷰>
  <?php echo form_open_multipart($PageInfo['FullController'].'/show_black_list'); ?>
  <table class="search_where">
   <tr>
    <td><input type="submit" name="submit[search]" value=" 재검색"/></td>
    <td><input type="submit" name="submit[download]" value=" 다운로드 "/></td>
   </tr>
   <tr valign='middle'>
    <td colspan='2'>
      <input type="file" name="userfile" size="20" />  
      <input type="submit" name="submit[add]" value=" 일괄추가 " /> 
    </td>
   </tr>
  </table>
  <?php echo form_close(); ?>


뷰에서 위와 같이 작성했습니다만, 컴파일러에서 userfile에 계속 널값이 넘어와서 오류가 나네요~

<컴파일러>

 function show_black_list()
 {
  $this->load->model('webform/cardcheck/black_search_form');
  $this->black_search_form->parse_request();

  // コマンド取得
  $_command = $this->black_search_form->get_submit_command();

  // コマンド別処理
  switch($_command){
   case 'add':
    $config['upload_path'] = './uploads/';
    $config['allowed_types'] = 'csv|txt';
    $config['max_size'] = '100';
    $config['max_width']  = '1024';
    $config['max_height']  = '768';

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

    if ( ! $this->upload->do_upload())
    {
     $_error = array('error' => $this->upload->display_errors());
     $this->load->view('upload_form', $error);
    } 
    else
    {
     $_data = array('upload_data' => $this->upload->data());
     $this->load->view('upload_success', $data);
    }
   break;
  }


뭐가  틀렸는지 알려주세요~~ ㅠㅠ

 다음글 CI 2.1.0 hmvc 및 index 파일 질문 (5)
 이전글 크론, CLI 질문좀 드릴께요ㅠㅠ (7)

댓글

미갱 / 2011/11/28 20:01:29 / 추천 0
아 죄송합니다~ 패스의 문제(상대경로)였습니다~

$config['upload_path'] = './uploads/'; 이부분을 
$config['upload_path'] = APPPATH.'/uploads/'; 이렇게 고쳐서 해결했습니당~ >..<

죄송합니당~~
한대승(불의회상) / 2011/11/28 23:36:09 / 추천 0
수고 하셨습니다.
CI와 함께 즐거운 코딩 되세요.