Home > Backend Development > PHP Tutorial > File upload suffix name and file type comparison table_PHP tutorial

File upload suffix name and file type comparison table_PHP tutorial

WBOY
Release: 2016-07-13 17:39:10
Original
994 people have browsed it

There are many PHP file upload classes on the Internet. File upload processing is a feature of PHP (at least the manual shows this as a PHP feature. I personally think that PHP’s excellent array functions are more distinctive) People who learn PHP know how to upload files, but many people may have overlooked some details during programming, that is, the file type (MIME). Before the form submits the file to PHP for processing, the browser will first parse and identify what type of file it is, and then enter PHP processing, PHP will identify and parse the original type of the file (it does not mean what suffix you changed to is what file). In this process, there will be some browser compatibility. To be more precise, it is the problem of inconsistent file type parsing identifiers. In this way, when PHP processes the file types posted, more judgments need to be made based on different browsers. The most typical one is the difference between IE and Firefox.

php upload image files (gif, jpg, bmp, png, psd, ico)

php upload compressed files (rar, 7z, zip)

 php upload executable file (exe)

php upload video files, music files, lyrics files (avi, rmvb, 3gp, flv, mp3, wav, krc, lrc)

php upload text files and document files (word->doc, excel->xls, slideshow->ppt, pdf, chm)

PHP upload database files (access files, sql files, con files, log files log, dat files)

PHP uploads web page files, script files, font files (ini, php, html, htm, font files: ttf, fon, js, xml)

PHP uploads other files (class files, dll dynamically loaded library files)

The most complete file type correspondence table for Oophper pro-test version PHP file upload in history, one for IE and one for Firefox.

ie Firefox

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486316.htmlTechArticle网上有很多php文件上传的类,文件上传处理是php的一个特色(至少手册上是将此作为php特点来展示的,个人认为php在数组方面的优异功能更有...
id Suffix File type recognized by php
0 gif image/gif
1 jpg image/pjpeg
2 png image/x-png
3 bmp image/bmp
4 psd application/octet-stream
5 ico image/x-icon
6 rar application/octet-stream
7 zip application/x-zip-compressed
8 7z application/octet-stream
9 exe application/octet-stream
10 avi video/avi
11 rmvb application/vnd.rn-realmedia-vbr
12 3gp application/octet-stream
13 flv application/octet-stream
14 mp3 audio/mpeg
15 wav audio/wav
16 krc application/octet-stream
17 lrc application/octet-stream
18 txt text/plain
19 doc application/msword
20 xls application/vnd.ms-excel
21 ppt application/vnd.ms-powerpoint
22 pdf application/pdf
23 chm application/octet-stream
24 mdb application/msaccess
25 sql text/plain
26 con application/octet-stream
27 log text/plain
28 dat text/plain
29 ini application/octet-stream
30 php application/octet-stream
31 html text/html
32 htm text/html
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template