文件上传操作

<html>
		<body>
				<form action="index.php" method="post"  enctype="multipart/form-data">
						缩略图:<input type="file" name="files" />
						<input type="submit" value="提交"/>
				</form>
		</body>
</html>
1 <?php
2 $temp_name = $_FILES[files][tmp_name]; //临时文件
3   $now_name = $_FILES[files][name]; //当前文件
4   move_uploaded_file($temp_name,'./images/'.date('YYYYmdHis').$now_name); //移动到指定的文件夹下面
5  ?>
原文地址:https://www.cnblogs.com/wangzong/p/1930337.html