-1
파일을 업로드하려고하지만 업로드 할 수 없습니다. flg 값 2를 보여줍니다.move_uploaded_file을 사용하여 파일 업로드
$file = $_FILES['file'];
$file_name = $file['name'];
$file_size = $file['size'];
$file_error = $file['error'];
$file_ext = explode('.', $file_name);
$file_ext = strtolower(end($file_ext));
$file_tmp = $file['tmp_name'];
$file_destination = 'upload/' . $title .'.' . $file_ext;
if($file_size < 2097152){
if(move_uploaded_file($file_tmp, $file_destination)){
$flg = 1;
}
else
{
$flg = 2;
}
}
else
{
$flg = 3;
}
을 : 그래서 ... http://php.net/manual/en/function.error-reporting.php --- http://php.net/manual/en/features.file-upload.errors.php –
에 오신 것을 환영합니다. [둘러보기] (http://stackoverflow.com/tour)를보십시오. [What topics about about] (http://stackoverflow.com/help/on-topic) 및 [How to ask a good question] (http://stackoverflow.com/help/help/) 확인란을 선택할 수도 있습니다. how-to-ask) 및 [완벽한 질문] (http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/)을 작성하는 방법과 [Minimal, Complete and 확인 가능한 예제] (http://stackoverflow.com/help/mcve). 시도한 코드와받은 오류를 게시하십시오. 가능한 한 구체적이어야 더 나은 답변으로 이어질 것입니다. –