다른 입력과 파일 업로드 입력을 포함하는 양식이 있습니다. 사용자가 이미지를 업로드하고 업로드하고 싶지만 업로드하고 싶지 않은 경우 사용자를 원합니다. 오류를주지 마십시오.Codeigniter 업로드 이미지 선택
if($_POST){
$config['upload_path'] = 'images/tmp';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 2048;
$config['min_width'] = 480;
$config['min_height'] = 360;
$this->load->library('upload', $config);
if (!$this->upload->do_upload('userfile')) {
$error = array('error' => $this->upload->display_errors());
//Sending this $error to view and if a user didnt upload image and just filled
//the other inputs it shows error. but i dont want that.
} else { }
} else {
redirect(site_url());
}
그래, 괜찮아요. 그러나 허용되는 유형과 같은 다른 오류는 어때요? 나는 단지 이미지가 업로드 된 오류가 아니라는 것을 보여주고 싶다. – codeigniter