을 사용하여, 나는 form_open_multipart()
을 사용하고, 내가 가진 : 내가하려고 할 때,업로드 파일 이미지 내보기에 CI
$config['upload_path'] = './resources/uploads/';
$config['allowed_types'] = 'jpg|gif|png|bmp|jpeg';
$config['max_size'] = '0';
$config['max_width'] = '0';
$config['max_height'] = '0';
$this->load->library('upload', $config);
if(!$this->upload->do_upload('user_photo')) {
echo $this->upload->display_errors('<p>', '</p>');
} else {
echo "<pre>"; print_r($this->upload->data());
}
을하지만 :
<input type="file" name="user_photo" style="margin-top: 5px;" />
내가 이렇게 내 컨트롤러에서 구성을 파일 형식 * .jpg로 이미지 파일 업로드, 다음과 같은 오류가 있습니다. The file type you are attempting to upload is not allowed.
구성에 문제가 있습니까? 덕분에 .
어떤 CodeIgniter 버전을 사용하고 있으며 어떤 버전의 PHP를 사용하는 데 문제가있는 웹 서버입니까? – stealthyninja
을 사용하고 있습니까? 구성에서 $ config [ 'file_name']? –
@stealthyninja CodeIgniter 2.1.0 및 PHP 5.3.0을 사용하고 있습니다. – Praditha