亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Precautions for php file upload form

We start formal learning and learn how to upload files. To upload files, a form must be prepared on the web page.

This is a simple HTML page form. The form form prepares a dedicated class for file content. When type=file is selected, the default is to upload the file content.

Let’s take a look at the code and precautions of the form

<html>
   <head>
       <meta charset="utf-8" />
       <title>單文件上傳</title>
   </head>
   <body>
       <form action="file.php" method="post" enctype="multipart/form-data">
           <input type="file" name="file">
           <input type="submit" value="上傳">
       </form>
   </body>
</html>

Notes:

1. The parameter method in the form form must be post. If it is get, file upload cannot be performed

2.enctype must be multipart/form-data


Continuing Learning
||
<html> <head> <meta charset="utf-8" /> <title>單文件上傳</title> </head> <body> <form action="file.php" method="post" enctype="multipart/form-data"> <input type="file" name="file"> <input type="submit" value="上傳"> </form> </body> </html>
submitReset Code