header头参数 确定该文件类型

‘chm‘=>‘application/octet-stream‘,

‘ppt‘=>‘application/vnd.ms-powerpoint‘,

‘xls‘=>‘application/vnd.ms-excel‘,

‘doc‘=>‘application/msword‘,

‘exe‘=>‘application/octet-stream‘,

‘rar‘=>‘application/octet-stream‘,

".001"="application/x-001"

".323"="text/h323"

".907"="drawing/907"

".acp"="audio/x-mei-aac"

".aif"="audio/aiff"

".aiff"="audio/aiff"

".asa"="text/asa"

".asp"="text/asp"

".au"="audio/basic"

".awf"="application/vnd.adobe.workflow"

".bmp"="application/x-bmp"

".c4t"="application/x-c4t"

".cal"="application/x-cals"

".cdf"="application/x-netcdf"

".cel"="application/x-cel"

".cg4"="application/x-g4"

".cit"="application/x-cit"

".cml"="text/xml"

".cmx"="application/x-cmx"

".crl"="application/pkix-crl"

".csi"="application/x-csi"

".cut"="application/x-cut"

".dbm"="application/x-dbm"

".dcd"="text/xml"

".der"="application/x-x509-ca-cert"

".dib"="application/x-dib"

".doc"="application/msword"

".drw"="application/x-drw"

".dwf"="Model/vnd.dwf"

".dwg"="application/x-dwg"

".dxf"="application/x-dxf"

".emf"="application/x-emf"

".ent"="text/xml"

".eps"="application/x-ps"

".etd"="application/x-ebx"

".fax"="image/fax"

".fif"="application/fractals"

".frm"="application/x-frm"

".gbr"="application/x-gbr"

".gif"="image/gif"

".gp4"="application/x-gp4"

".hmr"="application/x-hmr"

".hpl"="application/x-hpl"

".hrf"="application/x-hrf"

".htc"="text/x-component"

".html"="text/html"

".htx"="text/html"

".ico"="image/x-icon"

".iff"="application/x-iff"

".igs"="application/x-igs"

".img"="application/x-img"

".isp"="application/x-internet-signup"

".java"="java/*"

".jpe"="image/jpeg"

".jpeg"="image/jpeg"

".jpg"="application/x-jpg"

".jsp"="text/html"

".lar"="application/x-laplayer-reg"

".lavs"="audio/x-liquid-secure"

".lmsff"="audio/x-la-lms"

".ltr"="application/x-ltr"

".m2v"="video/x-mpeg"

".m4e"="video/mpeg4"

".man"="application/x-troff-man"

".mdb"="application/msaccess"

".mfp"="application/x-shockwave-flash"

".mhtml"="message/rfc822"

".mid"="audio/mid"

".mil"="application/x-mil"

".mnd"="audio/x-musicnet-download"

".mocha"="application/x-javascript"

".mp1"="audio/mp1"

".mp2v"="video/mpeg"

".mp4"="video/mpeg4"

".mpd"="application/vnd.ms-project"

".mpeg"="video/mpg"

".mpga"="audio/rn-mpeg"

".mps"="video/x-mpeg"

".mpv"="video/mpg"

".mpw"="application/vnd.ms-project"

".mtx"="text/xml"

".net"="image/pnetvue"

".nws"="message/rfc822"

".out"="application/x-out"

".p12"="application/x-pkcs12"

".p7c"="application/pkcs7-mime"

".p7r"="application/x-pkcs7-certreqresp"

".pc5"="application/x-pc5"

".pcl"="application/x-pcl"

".pdf"="application/pdf"

".pdx"="application/vnd.adobe.pdx"

".pgl"="application/x-pgl"

".pko"="application/vnd.ms-pki.pko"

".plg"="text/html"

".plt"="application/x-plt"

".png"="application/x-png"

".ppa"="application/vnd.ms-powerpoint"

".pps"="application/vnd.ms-powerpoint"

".ppt"="application/x-ppt"

".prf"="application/pics-rules"

".prt"="application/x-prt"

".ps"="application/postscript"

".pwz"="application/vnd.ms-powerpoint"

".ra"="audio/vnd.rn-realaudio"

".ras"="application/x-ras"

".rdf"="text/xml"

".red"="application/x-red"

".rjs"="application/vnd.rn-realsystem-rjs"

".rlc"="application/x-rlc"

".rm"="application/vnd.rn-realmedia"

".rmi"="audio/mid"

".rmm"="audio/x-pn-realaudio"

".rms"="application/vnd.rn-realmedia-secure"

".rmx"="application/vnd.rn-realsystem-rmx"

".rp"="image/vnd.rn-realpix"

".rsml"="application/vnd.rn-rsml"

".rtf"="application/msword"

".rv"="video/vnd.rn-realvideo"

".sat"="application/x-sat"

".sdw"="application/x-sdw"

".slb"="application/x-slb"

".slk"="drawing/x-slk"

".smil"="application/smil"

".snd"="audio/basic"

".sor"="text/plain"

".spl"="application/futuresplash"

".ssm"="application/streamingmedia"

".stl"="application/vnd.ms-pki.stl"

".sty"="application/x-sty"

".swf"="application/x-shockwave-flash"

".tg4"="application/x-tg4"

".tif"="image/tiff"

".tiff"="image/tiff"

".top"="drawing/x-top"

".tsd"="text/xml"

".uin"="application/x-icq"

".vcf"="text/x-vcard"

".vdx"="application/vnd.visio"

".vpg"="application/x-vpeg005"

".vsd"="application/x-vsd"

".vst"="application/vnd.visio"

".vsw"="application/vnd.visio"

".vtx"="application/vnd.visio"

".wav"="audio/wav"

".wb1"="application/x-wb1"

".wb3"="application/x-wb3"

".wiz"="application/msword"

".wk4"="application/x-wk4"

".wks"="application/x-wks"

".wma"="audio/x-ms-wma"

".wmf"="application/x-wmf"

".wmv"="video/x-ms-wmv"

".wmz"="application/x-ms-wmz"

".wpd"="application/x-wpd"

".wpl"="application/vnd.ms-wpl"

".wr1"="application/x-wr1"

".wrk"="application/x-wrk"

".ws2"="application/x-ws"

".wsdl"="text/xml"

".xdp"="application/vnd.adobe.xdp"

".xfd"="application/vnd.adobe.xfd"

".xhtml"="text/html"

".xls"="application/x-xls"

".xml"="text/xml"

".xq"="text/xml"

".xquery"="text/xml"

".xsl"="text/xml"

".xwd"="application/x-xwd"

".x_t"="application/x-x_t"

".myz"="application/myz"

时间: 2024-11-05 17:25:48

header头参数 确定该文件类型的相关文章

UNIX环境编程学习笔记(6)——文件I/O之判断文件类型

lienhua342014-09-01 1 文件类型 我们平时最常接触的文件类型有普通文件(regular file)和目录(di-rectory file),但是 UNIX 系统提供了多种文件类型: (1) 普通文件(regular file) 这种文件包含了某种形式的数据,这些数据无论是文件还是二进制对于 UNIX 内核而言都是一样的.对普通文件内容的解释有处理该文件的应用程序进行. (2) 目录文件(directory file) 目录文件包含了其他文件的名字以及指向与这些文件有关信息的指

header头 下载文件 参数详解

header("Pragma: public"); //1 header("Expires: 0"); //2 header("Cache-Control:must-revalidate, post-check=0, pre-check=0");//3 header("Content-Type:application/force-download");//4 header("Content-Type:applicat

4.1 对每个命令行参数打印文件类型

file/filetype.c #include "apue.h" int main(int argc, char *argv[]) { int i; struct stat buf; char *ptr; for (i = 1; i < argc; i++) { printf("%s: ", argv[i]); if (lstat(argv[i], &buf) < 0) { err_ret("lstat error"); c

利用PHP取二进制文件头判断文件类型

<?php $files = array('D:\no.jpg', 'D:\no.png','D:\no2.JPEG','D:\no.BMP'); $fileTypes = array( 7790 => 'exe', 7784 => 'midi', 8297 => 'rar', 255216 => 'jpg', 7173 => 'gif', 6677 => 'bmp', 13780 => 'png' ); foreach($files as $file) {

PHP使用CURL设置header头传参以及设置Content-Type: application/json类型的后台数据接收

CURL函数 public function CurlRequest($url,$data=null,$header=null){ //初始化浏览器 $ch = curl_init(); //设置浏览器,把参数url传到浏览器的设置当中 curl_setopt($ch, CURLOPT_URL, $url); //以字符串形式返回到浏览器当中 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //禁止https协议验证域名,0就是禁止验证域名且兼容p

文件类型分类:头文件dirent.h中定义的文件类型与linux内文件符号对应关系

头文件 dirent.h 定义了文件类型: enum{    DT_UNKNOWN = 0,         //未知类型    DT_FIFO = 1,            //first in, first out 类似于管道, 有名管道    DT_CHR = 2,             //字符设备文件    DT_DIR = 4,             //目录    DT_BLK = 6,             //块设备文件    DT_REG = 8,          

通过判断流的头 判断文件类型

图片文件 文件类型 扩展名 16进制数字xx这里表示变量 Ascii数字. = 不是Ascii字符 Bitmap format .bmp 42 4d BM FITS format .fits 53 49 4d 50 4c 45 SIMPLE GIF format .gif 47 49 46 38 GIF8 Graphics Kernel System .gks 47 4b 53 4d GKSM IRIS rgb format .rgb 01 da .. ITC (CMU WM) format .

转:NLog之:文件类型目标(File target)

转:http://www.cnblogs.com/RitchieChen/archive/2012/07/16/2594308.html 英文原文[http://nlog-project.org/wiki/File_target] 用途 将日志信息写到一个或多个文件中. 支持.NET Framework1.0; 1.1; 2.0; 3.5; 4.0 SilverLight4.0 .NET Compact Framework1.0; 2.0; 3.5; Mono.NET. 配置语法 <target

获取pe文件的文件类型

工程文件petype.cpp通过调用pefile类中的函数获取文件类型. 文件类型的判断通过5个监测点完成. 监测点1:dos头的e_magic 监测点2:nt头的Signature 监测点3:文件头的Characteristics 监测点4:可选头的Magic 监测点5:可选头的Subsystem 通过监测点1和2判断是否是pe文件: 通过监测点3判断文件是否是动态库文件 通过监测点4判断文件是pe32还是pe32+还是rom映像 通过监测点5判断文件是否是0环可执行文件[驱动文件],还是3环