<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>文件上传</title> </head> <body> <form action="UpLoad.php" method="post" enctype="multipart/form-data" > <input type="file" value=""><br> <input type="submit" value="上传文件" /><br> </form> </body> </html>
注意:input中的name必须和上传类中的uploadFile中是传值一致!