Different file types in php upload
This page contains the listing of different files and their types identified by PHP global variable.. It can be used to identify right file types and filter out unwanted uploads. It is just the output of $_FILES variables ['type'] index like below.
Array ( [name] => todo1.txt [type] => text/plain [tmp_name] => C:\apache\tmp\php4C.tmp [error] => 0 [size] => 476 )
| File type | PHP file type |
|---|---|
| EXE | application/octet-stream |
| Text | text/plain |
| application/pdf | |
| Microsoft Office Word Document.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Microsoft Office Word Document DOC | application/msword |
| Microsoft Office Excel Document | application/vnd.ms-excel |
| JPEG image | image/jpeg |
| Bitmap image | image/bmp |
| GIF image | image/gif |
| PNG image | image/png |
| ZIP | application/zip |
| MOBI Ebook format | application/octet-stream |
| MP3 | audio/mpeg |
| MPG Video | video/mpeg |
| Quicktime movie | video/quicktime |
| Quicktime movie | video/quicktime |