나는 모든 것을 얻었지만이 작업을합니다. move_uploaded_file();
을 사용할 수 없습니다.파일 업로드 파일
$ups_path = "ups/files";
$nfile = $_FILES['nfile']['tmp_name'];
$cfile = move_uploaded_file($nfile, $ups_path);
if($cfile){
header ('Location: index.php?give=fileuploaded');
} else {
header ('Location: index.php?give=filenotuploaded');
}
항상 이동하지 않는 오류가 반환됩니다.
'$ ups_path'는 아마도 절대 값이어야합니다. – Orbling
* 어떤 오류가 발생합니까? NB, mysql_real_escape_string()은이 시점에서 유용하지 않습니다. 파일 이름에 잘못된 문자는 제거되지 않습니다. –
왜'tmp_name'에 mysql_real_escape_string을 사용하고 있습니까? 그리고 아마 당신은 문자열을 변경하고 있습니다. 이것이 맞는지 확인하십시오. –