<html>
<head>
</head>
<body>
<?php
echo $_FILES['hello']['error'];
echo "start".$_FILES['hello']['type'];
echo $_FILES['hello']['size'];
echo $_FILES['hello']['tmp_name']."end";
move_uploaded_file($_FILES['hello']['tmp_name'], "./windows.pdf");
echo "finish!!";
?>
<p><font color="red">hello</font></p>
<?php
?>
<form action="index.php" enctype="multipart/form-data" method="post">
<input type="file" name="hello"/>
<input type="submit" name="submit" value="submit"/>
</form>
</body>
</html>
PHP上传文件小例子
最新推荐文章于 2024-06-12 11:00:21 发布