파일 업로드
업로드할 파일을 선택할 수 있는 컨트롤을 생성
문법
<input type="file" name="서버쪽에서 파일을 식별하기 위한 이름" />
예제
example1.html (jsfiddle, github)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
</head>
<body>
<form action="example_receive.php" method="POST" enctype="multipart/form-data">
<input type="file" name="image" />
<input type="submit" />
</form>
</body>
</html>
example_receive.php (jsfiddle, github)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
</head>
<body>
<?php
$uploaddir = '/var/www/codingeverybody_html_tutorial/upload_75/';
$uploadfile = $uploaddir . basename($_FILES['image']['name']);
move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile);
?>
<img src="<?=$_FILES['image']['name']?>" />
</body>
</html>

