<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<form action="chuli.php" method="post" enctype="multipart/form-data">
			<input type="file" name="file" />
			<input type="submit" value="上传" />
		</form>
	</body>
</html>


处理页面

<?php
//var_dump($_FILES);
//临时文件目录 $linshi = $_FILES["file"]["tmp_name"]; $fname = "./file/" . time() . $_FILES["file"]["name"]; //临时文件存放路径 iconv("UTF-8", "GB2312", $fname); move_uploaded_file($linshi, $fname);

  

posted on 2017-09-17 14:09  唯懿  阅读(112)  评论(0编辑  收藏  举报