Okay, let's take a look at the simplest php file Upload Example tutorial, we'll use Move_uploaded_file to upload local articles to the server.
Okay, let's take a look at the simplest php file Upload Example tutorial, we'll use Move_uploaded_file to upload local articles to the server.
With PHP, you can upload files to the server.
-------------------------------------------------- ------------------------------
Create an upload file form
In order for users to upload files in the form can be very useful.
Take a look at the file upload for the following HTML form:
Please note the following HTML form above:
This is the Enctype property
The tags the specified content type when used in the form of submission. "Multiple/form of data" when using a form that requires binary data, such as the file content, will upload the
this type = "File" attribute specifies that the input of the tag should be the processing file. For example, when viewed in a browser, there will be a browse button next to the input field
Note: Allowing users to upload files is a great security risk. Only trusted users are allowed to upload files.
Create upload script
The code that is included in the "upload_file.php" file uploads the file:
Move_uploaded_file ($_files["File" ["Tmp_name"] A
"upload/". $_files["File" ["name"]);
echo "Stored in:". Upload/". $_files["File" ["name"];
The
is so simple.
http://www.bkjia.com/phpjc/630484.html www.bkjia.com true http://www.bkjia.com/phpjc/630484.html techarticle Well, let's take a look at the simplest php file Upload Example tutorial, we'll use Move_uploaded_file to upload local articles to the server. Okay, let's take a look at the simplest php text ...