PHP development...LOGIN

PHP development file upload tutorial: processing uploaded files (1)

We mentioned in the previous section that the form is submitted to the doaction.php page. Let's take a look at the doaction.php file.

We first output the form to submit the uploaded file and select the file on our desktop. 1.jpg

When receiving uploaded files, we need to use a variable $_FILES

to write the output in doction.php

print_r($_FILES);

1.png

In this way, the information of the file we uploaded can be obtained

Note:

This is when we have selected pictures. Submit to doaction.php. When no picture is selected, or the form is not submitted in post mode, or there are letter errors in our enctype="multipart/form-data" code, errors will appear in doaction.php, as follows In this section we will explain some operations on file upload

Next Section
<?php print_r($_FILES); ?>
submitReset Code
ChapterCourseware