日期:2014-05-17 浏览次数:20488 次
<form enctype="multipart/form-data" action="singleupload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
<input type=file name=upfile size=20>
<input type=submit value="上传文件">
</form>
if (move_uploaded_file($_FILES['upfile']['tmp_name'], $_FILES['upfile']['name'])) {
echo "<h2><font color=#ff0000>文件上传成功!</font></h2><br><br>";
}else {
echo "<h2><font color=#ff0000>文件上传失败!</font></h2><br><br>";
}