| 1. |
Explain concepts of HTTP Uploading process? |
|
Answer» File Upload: 1. File upload is the best feature to select one file from the local machine to server.machine. Form tag is used to mention a method as POST or GET and encrypt attribute mentioned as “multipart/form-data”. 2. In the tag mention type= ”file” attribute shows the input field as a file-select control, with a “Browse” button next to the input control. 3. The form above sends data to a file called “Student_photo_upload.php”. 4. First, ensure that PHP is configured to allow file uploads. 5. In Server machine “php.ini” file, search for the file_uploads directive, and set it to On: “file_upIoads = On” 6. After submitting the upload button the request reaches to Student_photo_upload.php file. In the file $_FILES variable collects all uploaded file information such as name of the file, size of the file and extension of the file etc. 7. All the details are checked thoroughly and the errors are saved in an array variable. 8. The file finally moves under the image directory if the array error variable is empty. |
|