Hi Friends,
Today,I’m trying to display the name, size and type of a file uploaded. Mainly here I explains how to get the file name, file size (in bytes), file type (Image/Text/PDF/spreadsheet files) after select the documents.
Uploading the files in php page using ‘file’ type in HTML input like <input type=”file” name=”image”/>. Some times we may need to know the file name,type and size of the file that is uploaded.
Here is give a simple method to get the file name, type and size of the file that is being uploaded in pure php page.
Basically when the user selects any files using input file tag we will display its file name, file size and file type of files selected.
File Size : $file_size
File Type :$file_type "; //echo ''; } ?>
Description: Here we first add a input file tag and button within form tag. If we select the files then it display name,size and type of file selected. Using Html5 we can also preview image preview image