파일 업로드 문제..
public function setUpload()
{
$config['upload_path'] = '/upload';
$config['encrypt_name'] = 'TRUE';
$this -> load -> library('upload', $config);
if($this -> upload -> do_upload())
{
echo $this -> upload -> display_errors('<p>','</p>');
}
else
{
var_dump($this->upload->data());
}
}
페이지는 정상적으로 받아온거같은데 해당 경로에 정상적으로 저장이 되지 않습니다.
array(14) { ["file_name"]=> string(0) "" ["file_type"]=> string(0) "" ["file_path"]=> string(8) "/upload/" ["full_path"]=> string(8) "/upload/" ["raw_name"]=> string(0) "" ["orig_name"]=> string(0) "" ["client_name"]=> string(0) "" ["file_ext"]=> string(0) "" ["file_size"]=> string(0) "" ["is_image"]=> bool(false) ["image_width"]=> string(0) "" ["image_height"]=> string(0) "" ["image_type"]=> string(0) "" ["image_size_str"]=> string(0) "" }
설정한 /upload 디렉토리는 application과 같은 레벨에 존재해야 합니다.
파일 업로드관련 질문 하실때는 서버가 윈도우인지 리눅스인지도 글에 올려줘야 합니다.
리눅스일 경우엔 퍼미션 문제도 있습니다.
일단 로그 보세요. 로그에 답이 있습니다.