PHP文件上传后缀名与文件类型对照表

php上传常见文件类型对应的$_FILES[“file”][“type”]

1、xls

application/vnd.ms-excel

2、xlsx

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

3、ppt

application/vnd.ms-powerpoint

4、pptx

application/vnd.openxmlformats-officedocument.presentationml.presentation

5、doc

application/msword

6、docx

application/vnd.openxmlformats-officedocument.wordprocessingml.document

7、zip

application/x-zip-compressed

8、rar

application/x-zip-compressed

9、wmv

video/x-ms-wmv

10、mp3

audio/mpeg

11、mp4

video/mp4

12、gif

image/gif

13、jpg

image/jpeg

14、png

image/png

15、bmp

image/bmp

16、psd

application/octet-stream

17、ico

image/x-icon

18、7z

application/octet-stream

19、exe

application/octet-stream

20、avi

video/avi

21、rmvb

application/vnd.rn-realmedia-vbr

22、3gp

application/octet-stream

23、flv

application/octet-stream

24、wav

audio/wav

25、krc

application/octet-stream

26、lrc

application/octet-stream

27、txt

text/plain

28、pdf

application/pdf

29、chm

application/octet-stream

30、mdb

application/msaccess

31、sql

application/octet-stream

32、con

application/octet-stream

33、log

text/plain

34、dat

application/octet-stream

35、ini

application/octet-stream

36、php

application/octet-stream

37、html 和 htmhtm

text/html

38、ttf

application/octet-stream

39、fon

application/octet-stream

40、js

application/x-javascript

41、xml

text/xml

42、dll

application/octet-stream

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值