0
다음과 같은 코드가 서버에 파일을 저장합니다 업로드 PHP에 대한 간단한 하나입니다 알다시피 :간단한 웹 서비스
<?php
$uploaddir = "uploads/";
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "Success";
} else {
echo "Failure";
}
?>
I을 웹 서비스로 작성된이 코드 스 니펫과 동일한 기능이 필요합니다 (클라이언트가 업로드 할 파일 인 하나의 매개 변수를 사용하여이를 호출 할 수 있고 이미지라고합시다).
미리 감사드립니다.
그럼, 무엇이 문제입니까? – Blender
나는이 코드를 웹 서비스로 사용하기 위해 포장하고 싶다. – JAHelia