Advertisements
Advertisements
प्रश्न
Explain concepts of HTTP Uploading process.
थोडक्यात उत्तर
Advertisements
उत्तर
- 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”.
- In the <Input> tag mention type=”file” attribute shows the input field as a file-select control, with a “Browse” button next to the input control.
- The form above sends data to a file called “Student_photo_upload.php”.
- First, ensure that PHP is configured to allow file uploads.
- In Server machine “php.ini” file, search for the file_uploads directive, and set it to On: “file_upIoads = On”
- 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 the name of the file, size of the file and extension of the file etc.
- All the details are checked thoroughly and the errors are saved in an array variable.
- The file finally moves under the image directory if the array error variable is empty.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
