php file upload plays an important role in the website, and this article explains it in detail.
Create a file upload form
It is very useful to allow users to upload files from a form.
Please look at the HTML form for uploading files below:
<html><head><meta charset="utf-8"><title>菜鸟教程(runoob.com)</title></head><body><form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">文件名:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="提交"></form></body></html>
Save the above code into the form.html file.
Some notes about the above HTML form are listed below:
The enctype attribute of the