• 关于 text-info 的搜索结果

回答

支持, 首先A表和B表需要有关联的列, 关联之后A表和B表应该是多对一或者一对一的关系, 如果是一对多会怎么样呢? 任何数据库都会给你一个不确定的答案 测试如下 : sar=> create table a (id int primary key, info text); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for table "a" CREATE TABLE sar=> create table b (id int, info text); CREATE TABLE sar=> insert into a select generate_series(1,10),'digoal'; INSERT 0 10 sar=> insert into b select generate_series(1,10),'Digoal'; INSERT 0 10 sar=> insert into b select generate_series(1,10),'DIGOAL'; INSERT 0 10 sar=> select * from a where id=1; id | info ----+-------- 1 | digoal (1 row) sar=> select * from b where id=1; id | info ----+-------- 1 | Digoal 1 | DIGOAL (2 rows) 执行如下更新之后, a.id 会等于什么呢? 是Digoal, 还是DIGOAL. sar=> update a set info=b.info from b where a.id=b.id and a.id=1; UPDATE 1 sar=> select * from a where id=1; id | info ----+-------- 1 | Digoal (1 row) 看起来是第一次匹配到的B表的那条记录的info值. 所以在做多表关联的更新操作时, 需要注意这一点.

德哥 2019-12-02 01:29:47 0 浏览量 回答数 0

问题

最佳实践-PostgreSQL-模糊查询、正则查询和相似查询优化

李沃晟 2019-12-01 21:40:23 517 浏览量 回答数 0

回答

支持,使用tablefunc插件来实现,如下: 一般在提交报表的时候,可能会使用到对数据表的行列变换的需求。 如以下数据: digoal=> select * from tbl_sellers_info order by seller,se_year,se_month; seller | se_year | se_month | se_amount ----------+---------+----------+----------- 卡洛斯 | 2011 | 3 | 12 卡洛斯 | 2011 | 4 | 45 卡洛斯 | 2011 | 5 | 56 德哥 | 2010 | 1 | 123456 德哥 | 2010 | 2 | 234567 德哥 | 2010 | 3 | 345678 德哥 | 2010 | 4 | 345678 德哥 | 2010 | 5 | 567890 德哥 | 2010 | 6 | 123456 德哥 | 2010 | 7 | 234567 德哥 | 2010 | 8 | 345678 德哥 | 2010 | 9 | 345678 德哥 | 2010 | 10 | 567890 德哥 | 2010 | 11 | 123456 德哥 | 2010 | 12 | 234567 德哥 | 2011 | 1 | 123456 德哥 | 2011 | 2 | 234567 德哥 | 2011 | 3 | 345678 德哥 | 2011 | 4 | 345678 德哥 | 2011 | 5 | 567890 罗纳尔多 | 2011 | 2 | 20 罗纳尔多 | 2011 | 3 | 30 罗纳尔多 | 2011 | 4 | 40 罗纳尔多 | 2011 | 5 | 50 贝克汉姆 | 2010 | 11 | 12 贝克汉姆 | 2010 | 12 | 23 贝克汉姆 | 2011 | 1 | 12 贝克汉姆 | 2011 | 2 | 23 贝克汉姆 | 2011 | 3 | 34 贝克汉姆 | 2011 | 4 | 45 贝克汉姆 | 2011 | 5 | 56 (31 rows) 例如要按照每个SELLER出具每年的月度销售情况,可能要转换成: 图1 在PostgreSQL9.1里面有一个比较好用的extension,tablefunc,可以轻松的完成行列转换。 下面会有例子来简单的描述以下这个extension. 1. 安装tablefunc extension. \c digoal postgres You are now connected to database "digoal" as user "postgres". digoal=# create extension tablefunc; CREATE EXTENSION digoal=# \c digoal digoal You are now connected to database "digoal" as user "digoal". #安装完后会创建几个TYPE,几个函数. type: CREATE TYPE tablefunc_crosstab_N AS ( row_name TEXT, category_1 TEXT, category_2 TEXT, . . . category_N TEXT ); public | tablefunc_crosstab_2 | tablefunc_crosstab_2 | tuple | | public | tablefunc_crosstab_3 | tablefunc_crosstab_3 | tuple | | public | tablefunc_crosstab_4 | tablefunc_crosstab_4 | tuple | | function normal_rand(int numvals, float8 mean, float8 stddev) returns setof float8 crosstab(text sql) crosstab(text sql, int N) crosstabN(text sql) crosstab(text source_sql, text category_sql) connectby(text relname, text keyid_fld, text parent_keyid_fld [, text orderby_fld ], text start_with, int max_depth [, text branch_delim ]) 2. 创建测试表 create table tbl_sellers_info (seller text,se_year int,se_month int,se_amount int); insert into tbl_sellers_info values ('德哥',2011,01,123456); insert into tbl_sellers_info values ('德哥',2011,02,234567); insert into tbl_sellers_info values ('德哥',2011,03,345678); insert into tbl_sellers_info values ('德哥',2011,04,345678); insert into tbl_sellers_info values ('德哥',2011,05,567890); insert into tbl_sellers_info values ('贝克汉姆',2011,01,12); insert into tbl_sellers_info values ('贝克汉姆',2011,02,23); insert into tbl_sellers_info values ('贝克汉姆',2011,03,34); insert into tbl_sellers_info values ('贝克汉姆',2011,04,45); insert into tbl_sellers_info values ('贝克汉姆',2011,05,56); insert into tbl_sellers_info values ('卡洛斯',2011,03,12); insert into tbl_sellers_info values ('卡洛斯',2011,04,45); insert into tbl_sellers_info values ('卡洛斯',2011,05,56); insert into tbl_sellers_info values ('罗纳尔多',2011,02,20); insert into tbl_sellers_info values ('罗纳尔多',2011,03,30); insert into tbl_sellers_info values ('罗纳尔多',2011,04,40); insert into tbl_sellers_info values ('罗纳尔多',2011,05,50); insert into tbl_sellers_info values ('德哥',2010,01,123456); insert into tbl_sellers_info values ('德哥',2010,02,234567); insert into tbl_sellers_info values ('德哥',2010,03,345678); insert into tbl_sellers_info values ('德哥',2010,04,345678); insert into tbl_sellers_info values ('德哥',2010,05,567890); insert into tbl_sellers_info values ('德哥',2010,06,123456); insert into tbl_sellers_info values ('德哥',2010,07,234567); insert into tbl_sellers_info values ('德哥',2010,08,345678); insert into tbl_sellers_info values ('德哥',2010,09,345678); insert into tbl_sellers_info values ('德哥',2010,10,567890); insert into tbl_sellers_info values ('德哥',2010,11,123456); insert into tbl_sellers_info values ('德哥',2010,12,234567); insert into tbl_sellers_info values ('贝克汉姆',2010,11,12); insert into tbl_sellers_info values ('贝克汉姆',2010,12,23); 3. 下面我们用crosstab(text source_sql, text category_sql) 来满足需求. select substr(seller,1,char_length(seller)-4) seller,substr(seller,char_length(seller)-3) se_year,jan ,feb ,mar ,apr ,may ,jun ,jul ,aug ,sep ,oct ,nov ,dec from crosstab('select seller||se_year,se_month,se_amount from tbl_sellers_info order by 1', 'select distinct se_month from tbl_sellers_info order by 1') as (seller text,Jan numeric,feb numeric,mar numeric,apr numeric,may numeric,jun numeric,jul numeric,aug numeric,sep numeric,oct numeric,nov numeric,dec numeric) order by 1,2; # 分析一下这个函数: 参数一:(这个是需要进行行列变换的源SQL) select seller||se_year,se_month,se_amount from tbl_sellers_info order by 1 参数二:(这个在这里代表的是月份,也就是se_month的值) select distinct se_month from tbl_sellers_info order by 1 或者 select * from generate_series(1,12) order by 1 出来的结果都是一样的。 输出: (seller text,Jan numeric,feb numeric,mar numeric,apr numeric,may numeric,jun numeric,jul numeric,aug numeric,sep numeric,oct numeric,nov numeric,dec numeric) seller代表的是seller||se_year,这里必须这么做,因为需要按照这个来分组. 后面的就是月份了,数据类型是和se_amount一致就行了。 输出结果就是前面提到的图片。 行记录中没有的月份在变换后该月数据为空.例如卡洛斯只有2011年的3,4,5月份有数据,那么其他月份就是空白的。 # 另外一个要注意的是,输出结果的顺序是select * from generate_series(1,12) order by 1来决定的. # 例如 select * from generate_series(1,12) order by 1 desc 那么输出的顺序就是反的,因此必须严格的排序. 图2 # 另外的几个crosstab函数用法与此类似,只不过没有这个灵活。 # 而normal_rand用于返回一系列正态分布值。connect_by用于做异构查询(前面我有写过用with rescursive来实现)。就不再演示。 参考: http://www.postgresql.org/docs/9.5/static/tablefunc.html 图1 图2

德哥 2019-12-02 01:29:26 0 浏览量 回答数 0

新用户福利专场,云服务器ECS低至96.9元/年

新用户福利专场,云服务器ECS低至96.9元/年

回答

在云栖社区的问答区,有一位网友提到有一个问题: 表里相似数据太多,想删除相似度高的数据,有什么办法能实现吗? 例如: 银屑病怎么治? 银屑病怎么治疗? 银屑病怎么治疗好? 银屑病怎么能治疗好? 等等 解这个问题的思路 .1. 首先如何判断内容的相似度,PostgreSQL中提供了中文分词,pg_trgm(将字符串切成多个不重复的token,计算两个字符串的相似度) . 对于本题,我建议采取中文分词的方式,首先将内容拆分成词组。 .2. 在拆分成词组后,首先分组聚合,去除完全重复的数据。 .3. 然后自关联生成笛卡尔(矩阵),计算出每条记录和其他记录的相似度。相似度的算法很简单,重叠的token数量除以集合的token去重后的数量。 .4. 根据相似度,去除不需要的数据。 这里如果数据量非常庞大,使用专业的分析编程语言会更好例如 PL/R。 实操的例子: 首先要安装PostgreSQL 中文分词插件 (阿里云AliCloudDB PostgreSQL已包含这个插件,用法参考官方手册) git clone https://github.com/jaiminpan/pg_jieba.git mv pg_jieba $PGSRC/contrib/ export PATH=/home/digoal/pgsql9.5/bin:$PATH cd $PGSRC/contrib/pg_jieba make clean;make;make install git clone https://github.com/jaiminpan/pg_scws.git mv pg_jieba $PGSRC/contrib/ export PATH=/home/digoal/pgsql9.5/bin:$PATH cd $PGSRC/contrib/pg_scws make clean;make;make install 创建插件 psql # create extension pg_jieba; # create extension pg_scws; 创建测试CASE create table tdup1 (id int primary key, info text); create extension pg_trgm; insert into tdup1 values (1, '银屑病怎么治?'); insert into tdup1 values (2, '银屑病怎么治疗?'); insert into tdup1 values (3, '银屑病怎么治疗好?'); insert into tdup1 values (4, '银屑病怎么能治疗好?'); 这两种分词插件,可以任选一种。 postgres=# select to_tsvector('jiebacfg', info),* from tdup1 ; to_tsvector | id | info ---------------------+----+---------------------- '治':3 '银屑病':1 | 1 | 银屑病怎么治? '治疗':3 '银屑病':1 | 2 | 银屑病怎么治疗? '治疗':3 '银屑病':1 | 3 | 银屑病怎么治疗好? '治疗':4 '银屑病':1 | 4 | 银屑病怎么能治疗好? (4 rows) postgres=# select to_tsvector('scwscfg', info),* from tdup1 ; to_tsvector | id | info -----------------------------------+----+---------------------- '治':2 '银屑病':1 | 1 | 银屑病怎么治? '治疗':2 '银屑病':1 | 2 | 银屑病怎么治疗? '好':3 '治疗':2 '银屑病':1 | 3 | 银屑病怎么治疗好? '好':4 '治疗':3 '能':2 '银屑病':1 | 4 | 银屑病怎么能治疗好? (4 rows) 创建三个函数, 计算2个数组的集合(去重后的集合) postgres=# create or replace function array_union(text[], text[]) returns text[] as $$ select array_agg(c1) from (select c1 from unnest($1||$2) t(c1) group by c1) t; $$ language sql strict; CREATE FUNCTION 数组去重 postgres=# create or replace function array_dist(text[]) returns text[] as $$ select array_agg(c1) from (select c1 from unnest($1) t(c1) group by c1) t; $$ language sql strict; CREATE FUNCTION 计算两个数组的重叠部分(去重后的重叠部分) postgres=# create or replace function array_share(text[], text[]) returns text[] as $$ select array_agg(unnest) from (select unnest($1) intersect select unnest($2) group by 1) t; $$ language sql strict; CREATE FUNCTION 笛卡尔结果是这样的: regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:d+)', '', 'g')),' ') 用于将info转换成数组。 postgres=# with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select * from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2) t; t1c1 | t2c1 | t1c2 | t2c2 | t1c3 | t2c3 | simulate ------+------+----------------------+----------------------+-------------------+-------------------+---------- 1 | 1 | 银屑病怎么治? | 银屑病怎么治? | {'银屑病','治'} | {'银屑病','治'} | 1.00 1 | 2 | 银屑病怎么治? | 银屑病怎么治疗? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 1 | 3 | 银屑病怎么治? | 银屑病怎么治疗好? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 1 | 4 | 银屑病怎么治? | 银屑病怎么能治疗好? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 2 | 1 | 银屑病怎么治疗? | 银屑病怎么治? | {'银屑病','治疗'} | {'银屑病','治'} | 0.33 2 | 2 | 银屑病怎么治疗? | 银屑病怎么治疗? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 2 | 3 | 银屑病怎么治疗? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 2 | 4 | 银屑病怎么治疗? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 1 | 银屑病怎么治疗好? | 银屑病怎么治? | {'银屑病','治疗'} | {'银屑病','治'} | 0.33 3 | 2 | 银屑病怎么治疗好? | 银屑病怎么治疗? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 3 | 银屑病怎么治疗好? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 4 | 银屑病怎么治疗好? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 4 | 1 | 银屑病怎么能治疗好? | 银屑病怎么治? | {'银屑病','治疗'} | {'银屑病','治'} | 0.33 4 | 2 | 银屑病怎么能治疗好? | 银屑病怎么治疗? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 4 | 3 | 银屑病怎么能治疗好? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 4 | 4 | 银屑病怎么能治疗好? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 (16 rows) 以上生成的实际上是一个矩阵,simulate就是矩阵中我们需要计算的相似度: 我们在去重计算时不需要所有的笛卡尔积,只需要这个矩阵对角线的上部分或下部分数据即可。 所以加个条件就能完成。 postgres=# with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select * from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t; t1c1 | t2c1 | t1c2 | t2c2 | t1c3 | t2c3 | simulate ------+------+--------------------+----------------------+-------------------+-------------------+---------- 1 | 2 | 银屑病怎么治? | 银屑病怎么治疗? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 1 | 3 | 银屑病怎么治? | 银屑病怎么治疗好? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 1 | 4 | 银屑病怎么治? | 银屑病怎么能治疗好? | {'银屑病','治'} | {'银屑病','治疗'} | 0.33 2 | 3 | 银屑病怎么治疗? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 2 | 4 | 银屑病怎么治疗? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 4 | 银屑病怎么治疗好? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 (6 rows) 开始对这些数据去重,去重的第一步,明确simulate, 例如相似度大于0.5的,需要去重。 postgres=# with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select * from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t where simulate>0.5; t1c1 | t2c1 | t1c2 | t2c2 | t1c3 | t2c3 | simulate ------+------+--------------------+----------------------+-------------------+-------------------+---------- 2 | 3 | 银屑病怎么治疗? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 2 | 4 | 银屑病怎么治疗? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 4 | 银屑病怎么治疗好? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 (3 rows) 去重第二步,将t2c1列的ID对应的记录删掉即可。 delete from tdup1 where id in (with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select t2c1 from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t where simulate>0.5); 例如 : postgres=# insert into tdup1 values (11, '白血病怎么治?'); INSERT 0 1 postgres=# insert into tdup1 values (22, '白血病怎么治疗?'); INSERT 0 1 postgres=# insert into tdup1 values (13, '白血病怎么治疗好?'); INSERT 0 1 postgres=# insert into tdup1 values (24, '白血病怎么能治疗好?'); INSERT 0 1 postgres=# postgres=# with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select * from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t where simulate>0.5; t1c1 | t2c1 | t1c2 | t2c2 | t1c3 | t2c3 | simulate ------+------+--------------------+----------------------+-------------------+-------------------+---------- 2 | 3 | 银屑病怎么治疗? | 银屑病怎么治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 2 | 4 | 银屑病怎么治疗? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 3 | 4 | 银屑病怎么治疗好? | 银屑病怎么能治疗好? | {'银屑病','治疗'} | {'银屑病','治疗'} | 1.00 22 | 24 | 白血病怎么治疗? | 白血病怎么能治疗好? | {'治疗','白血病'} | {'治疗','白血病'} | 1.00 13 | 22 | 白血病怎么治疗好? | 白血病怎么治疗? | {'治疗','白血病'} | {'治疗','白血病'} | 1.00 13 | 24 | 白血病怎么治疗好? | 白血病怎么能治疗好? | {'治疗','白血病'} | {'治疗','白血病'} | 1.00 (6 rows) postgres=# begin; BEGIN postgres=# delete from tdup1 where id in (with t(c1,c2,c3) as postgres(# (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) postgres(# select t2c1 from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) postgres(# simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t where simulate>0.5); DELETE 4 postgres=# select * from tdup1 ; id | info ----+-------------------- 1 | 银屑病怎么治? 2 | 银屑病怎么治疗? 11 | 白血病怎么治? 13 | 白血病怎么治疗好? (4 rows) 用数据库解会遇到的问题, 因为我们的JOIN filter是<>和<,用不上hashjoin。 数据量比较大的情况下,耗时会非常的长。 postgres=# explain delete from tdup1 where id in (with t(c1,c2,c3) as (select id,info,array_dist(regexp_split_to_array((regexp_replace(to_tsvector('jiebacfg',info)::text,'(:\d+)', '', 'g')),' ')) from tdup1) select t2c1 from (select t1.c1 t1c1,t2.c1 t2c1,t1.c2 t1c2,t2.c2 t2c2,t1.c3 t1c3,t2.c3 t2c3,round(array_length(array_share(t1.c3,t2.c3),1)::numeric/array_length(array_union(t1.c3,t2.c3),1),2) simulate from t t1,t t2 where t1.c1<>t2.c1 and t1.c1<t2.c1) t where simulate>0.5); QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Delete on tdup1 (cost=10005260133.58..10005260215.84 rows=2555 width=34) -> Hash Join (cost=10005260133.58..10005260215.84 rows=2555 width=34) Hash Cond: (tdup1.id = "ANY_subquery".t2c1) -> Seq Scan on tdup1 (cost=0.00..61.10 rows=5110 width=10) -> Hash (cost=10005260131.08..10005260131.08 rows=200 width=32) -> HashAggregate (cost=10005260129.08..10005260131.08 rows=200 width=32) Group Key: "ANY_subquery".t2c1 -> Subquery Scan on "ANY_subquery" (cost=10000002667.20..10005252911.99 rows=2886838 width=32) -> Subquery Scan on t (cost=10000002667.20..10005224043.61 rows=2886838 width=4) Filter: (t.simulate > 0.5) CTE t -> Seq Scan on tdup1 tdup1_1 (cost=0.00..2667.20 rows=5110 width=36) -> Nested Loop (cost=10000000000.00..10005113119.99 rows=8660513 width=68) Join Filter: ((t1.c1 <> t2.c1) AND (t1.c1 < t2.c1)) -> CTE Scan on t t1 (cost=0.00..102.20 rows=5110 width=36) -> CTE Scan on t t2 (cost=0.00..102.20 rows=5110 width=36) (16 rows) 其他更优雅的方法,使用PLR或者R进行矩阵运算,得出结果后再进行筛选。 PLR R 或者使用MPP数据库例如Greenplum加上R和madlib可以对非常庞大的数据进行处理。 MADLIB MPP 小结 这里用到了PG的什么特性? .1. 中文分词 .2. 窗口查询功能 (本例中没有用到,但是如果你的数据没有主键时,则需要用ctid和row_number来定位到一条唯一记录)

德哥 2019-12-02 01:43:06 0 浏览量 回答数 0

回答

我试了一下,发现用命令:mvn-einstall安装,就好了。可能是,在编译过程中,里面有自定义的异常抛出导致的。其实,那是测试自定义异常的一个测试,出现这个异常,说明是正常的。如果不出现这个异常,才是有问题。######已修复,请更新。######我今天刚试了,还是不行哦!######我今天也试了,还是不行啊######<spanstyle="font-family:Verdana,sans-serif,宋体;font-size:14px;line-height:normal;background-color:#F9F9F9;">我今天也试了,不行啊[ERROR]Failedtoexecutegoalorg.apache.maven.plugins:maven-compiler-plugin:3.0:compile(default-compile)onprojectspringside-test:Fatalerrorcompiling:CompilerException:IllegalArgumentException:Illegalcharacterinpathatindex17:jar:/C:/DocumentsandSettings/admin/.m2###### 用命令mvn-einstall又执行了一遍, 又报:[INFO]Springside::Example::QuickStart...............FAILURE[5:40.593s] [ERROR]Failedtoexecutegoalonprojectquickstart:Couldnotresolvedependenciesforprojectorg.springside.examples:quickstart:war:4.0.1.GA:Thefollowingartifactscouldnotberesolved:javax.mail:mail:jar:1.4,javax.activation:activation:jar:1.1,commons-io:commons-io:jar:2.2:Couldnottransferartifactjavax.mail:mail:jar:1.4from/tocentral(http://repo.maven.apache.org/maven2):Connectiontohttp://repo.maven.apache.orgrefused:Connectiontimedout:connect->[Help1]org.apache.maven.lifecycle.LifecycleExecutionException:Failedtoexecutegoalonprojectquickstart:Couldnotresolvedependenciesforprojectorg.springside.examples:quickstart:war:4.0.1.GA:Thefollowingartifactscouldnotberesolved:javax.mail:mail:jar:1.4,javax.activation:activation:jar:1.1,commons-io:commons-io:jar:2.2:Couldnottransferartifactjavax.mail:mail:jar:1.4from/tocentral(http://repo.maven.apache.org/maven2):Connectiontohttp://repo.maven.apache.orgrefused ######又试了几次终于成功了,建议用小红伞的先暂关闭一下。 2013-03-2020:35:43,875[main]INFO [org.springside.examples.quickstart.reposit ory.JpaMappingTest]-ok:User 2013-03-2020:35:43,921[main]INFO [org.springside.examples.quickstart.reposit Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:10.422sec Runningorg.springside.examples.quickstart.repository.TaskDaoTest 2013-03-2020:35:44,312[main]WARN [org.springframework.aop.framework.Cglib2Ao pProxy]-Unabletoproxymethod[publicfinalvoidorg.springframework.test.con text.junit4.AbstractJUnit4SpringContextTests.setApplicationContext(org.springfra mework.context.ApplicationContext)]becauseitisfinal:Allcallstothismetho dviaaproxywillberouteddirectlytotheproxy. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.469sec Runningorg.springside.examples.quickstart.service.account.AccountServiceTest 2013-03-2020:35:44,968[main]WARN [org.springside.examples.quickstart.service .account.AccountService]-操作员foo尝试删除超级管理员用户 Testsrun:3,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.562sec Results: Testsrun:5,Failures:0,Errors:0,Skipped:0 [INFO] [INFO]---maven-war-plugin:2.3:war(default-war)@quickstart--- [INFO]Packagingwebapp [INFO]Assemblingwebapp[quickstart]in[D:\springside4-4.0.1.GA\examples\quick start\target\quickstart-4.0.1.GA] [INFO]Processingwarproject [INFO]Copyingwebappresources[D:\springside4-4.0.1.GA\examples\quickstart\src \main\webapp] [INFO]Webappassembledin[7094msecs] [INFO]Buildingwar:D:\springside4-4.0.1.GA\examples\quickstart\target\quicksta rt.war [INFO] [INFO]---maven-install-plugin:2.4:install(default-install)@quickstart--- [INFO]InstallingD:\springside4-4.0.1.GA\examples\quickstart\target\quickstart. wartoC:\DocumentsandSettings\admin.m2\repository\org\springside\examples\qu ickstart\4.0.1.GA\quickstart-4.0.1.GA.war [INFO]InstallingD:\springside4-4.0.1.GA\examples\quickstart\pom.xmltoC:\Docu mentsandSettings\admin.m2\repository\org\springside\examples\quickstart\4.0.1 .GA\quickstart-4.0.1.GA.pom [INFO] [INFO]------------------------------------------------------------------------ [INFO]BuildingSpringside::Example::Showcase4.0.1.GA [INFO]------------------------------------------------------------------------ Downloading:http://repo.maven.apache.org/maven2/org/jasypt/jasypt/1.9.0/jasypt- 1.9.0.jar 2013-3-2020:36:12org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirectortryExecute 信息:I/Oexception(org.apache.maven.wagon.providers.http.httpclient.NoHttpResp onseException)caughtwhenprocessingrequest:Thetargetserverfailedtorespo nd 2013-3-2020:36:12org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirectortryExecute 信息:Retryingrequest Downloaded:http://repo.maven.apache.org/maven2/org/jasypt/jasypt/1.9.0/jasypt-1 .9.0.jar(123KBat7.7KB/sec) [INFO] [INFO]---maven-enforcer-plugin:1.2:enforce(enforce-banned-dependencies)@sho wcase--- [INFO] [INFO]---build-helper-maven-plugin:1.7:add-test-source(add-source)@showcase  --- [INFO]TestSourcedirectory:D:\springside4-4.0.1.GA\examples\showcase\src\test \functionaladded. [INFO] [INFO]---maven-resources-plugin:2.6:resources(default-resources)@showcase- -- [INFO]Using'UTF-8'encodingtocopyfilteredresources. [INFO]Copying28resources [INFO] [INFO]---maven-compiler-plugin:3.0:compile(default-compile)@showcase--- [INFO]Changesdetected-recompilingthemodule! [INFO]Compiling62sourcefilestoD:\springside4-4.0.1.GA\examples\showcase\ta rget\classes [WARNING]注意:某些输入文件使用了未经检查或不安全的操作。 [WARNING]注意:要了解详细信息,请使用-Xlint:unchecked重新编译。 [INFO] [INFO]---maven-resources-plugin:2.6:testResources(default-testResources)@sh owcase--- [INFO]Using'UTF-8'encodingtocopyfilteredresources. [INFO]Copying6resources [INFO] [INFO]---maven-compiler-plugin:3.0:testCompile(default-testCompile)@showcas e--- [INFO]Changesdetected-recompilingthemodule! [INFO]Compiling22sourcefilestoD:\springside4-4.0.1.GA\examples\showcase\ta rget\test-classes [WARNING]注意:某些输入文件使用了未经检查或不安全的操作。 [WARNING]注意:要了解详细信息,请使用-Xlint:unchecked重新编译。 [INFO] [INFO]---maven-surefire-plugin:2.12.4:test(default-test)@showcase--- [INFO]Surefirereportdirectory:D:\springside4-4.0.1.GA\examples\showcase\targ et\surefire-reports [INFO]Usingconfiguredproviderorg.apache.maven.surefire.junitcore.JUnitCorePr ovider -------------------------------------------------------  TESTS ------------------------------------------------------- Concurrencyconfigisparallel='none',perCoreThreadCount=true,threadCount=2,u seUnlimitedThreads=false Runningorg.springside.examples.showcase.demos.jms.JmsAdvancedTest 2013-03-2020:36:27,656[main]ERRORorg.apache.activemq.broker.BrokerService-T emporaryStorelimitis51200mb,whilstthetemporarydatadirectory:D:\spring side4-4.0.1.GA\examples\showcase\activemq-data\showcase\tmp_storageonlyhas794 7mbofusablespace 2013-03-2020:36:29,218[advancedTopicContainer-1]INFO s.advanced.AdvancedNoti fyMessageListener-UserName:calvin,Email:calvin@sringside.org.cn,ObjectType:us er 2013-03-2020:36:33,234[advancedQueueContainer-3]INFO s.advanced.AdvancedNoti fyMessageListener-UserName:calvin,Email:calvin@sringside.org.cn,ObjectType:us er Testsrun:3,Failures:0,Errors:0,Skipped:0,Timeelapsed:14.891sec Runningorg.springside.examples.showcase.demos.jms.JmsSimpleTest 2013-03-2020:36:37,109[main]ERRORorg.apache.activemq.broker.BrokerService-T emporaryStorelimitis51200mb,whilstthetemporarydatadirectory:D:\spring side4-4.0.1.GA\examples\showcase\activemq-data\showcase\tmp_storageonlyhas794 7mbofusablespace 2013-03-2020:36:38,140[main]INFO xamples.showcase.demos.jms.JmsSimpleTest-s endedmessage 2013-03-2020:36:38,140[topicContainer-1]INFO e.demos.jms.simple.NotifyMessag eListener-UserName:calvin,Email:calvin@sringside.org.cn 2013-03-2020:36:40,156[queueContainer-10]INFO e.demos.jms.simple.NotifyMessa geListener-UserName:calvin,Email:calvin@sringside.org.cn 2013-03-2020:36:40,156[main]INFO xamples.showcase.demos.jms.JmsSimpleTest-s endedmessage Testsrun:2,Failures:0,Errors:0,Skipped:0,Timeelapsed:5.719sec Runningorg.springside.examples.showcase.demos.mail.MailServiceTest 2013-03-2020:36:44,093[main]INFO se.demos.utilities.email.MimeMailService-H TML版邮件已发送至springside3.demo<aclass="referer"target="_blank">@gmail.com <html> <head>用户修改通知</head> <body>     <h1>用户calvin被修改.</h1> </body> </html> 2013-03-2020:36:44,125[main]INFO .demos.utilities.email.SimpleMailService- 纯文本邮件已发送至springside3.demo<aclass="referer"target="_blank">@gmail.com             用戶calvin在2013-03-20被修改.                     SystemAdministrator. Testsrun:2,Failures:0,Errors:0,Skipped:0,Timeelapsed:1.844sec Runningorg.springside.examples.showcase.demos.schedule.JdkTimerJobTest 2013-03-2020:36:45,734[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. 2013-03-2020:36:47,046[JdkTimerJob-0]INFO showcase.demos.schedule.UserCountS canner-Thereare6userindatabase,printedbyjdktimerjob. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:4.609sec Runningorg.springside.examples.showcase.demos.schedule.QuartzTimerClusterJobTes t 2013-03-2020:36:50,281[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. 2013-03-2020:36:52,453[clusterQuartzScheduler_Worker-1]INFO case.demos.sched ule.QuartzClusterableJob-Thereare6userindatabase,printedbyquartzcluste rjobonnodedefault. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:5.265sec Runningorg.springside.examples.showcase.demos.schedule.SpringTimerJobTest 2013-03-2020:36:55,593[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. 2013-03-2020:36:55,609[springScheduler-2]INFO showcase.demos.schedule.UserCo untScanner-Thereare6userindatabase,printedbyspringtimerjobbyxml. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:2.953sec Runningorg.springside.examples.showcase.demos.web.CacheControlHeaderFilterTest Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.078sec Runningorg.springside.examples.showcase.repository.jpa.DynamicSpecificationTest 2013-03-2020:36:58,515[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:1.015sec Runningorg.springside.examples.showcase.repository.jpa.JpaMappingTest 2013-03-2020:36:58,812[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. 2013-03-2020:36:58,843[main]INFO s.showcase.repository.jpa.JpaMappingTest-o k:User 2013-03-2020:36:58,843[main]INFO s.showcase.repository.jpa.JpaMappingTest-o k:Team 2013-03-2020:36:58,859[main]INFO s.showcase.repository.jpa.JpaMappingTest-o k:Role Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.063sec Runningorg.springside.examples.showcase.repository.mybatis.TeamMybatisDaoTest 2013-03-2020:36:59,921[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:1.281sec Runningorg.springside.examples.showcase.repository.mybatis.UserMybatisDaoTest 2013-03-2020:37:00,953[main]WARN ngframework.aop.framework.Cglib2AopProxy-U nabletoproxymethod[publicfinalvoidorg.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)]becauseitisfinal:Allcallstothismethodviaapro xywillberouteddirectlytotheproxy. Testsrun:3,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.875sec Runningorg.springside.examples.showcase.service.AccountServiceTest 2013-03-2020:37:01,531[main]WARN examples.showcase.service.AccountService- 操作员foo尝试修改超级管理员用户 Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.421sec Results: Testsrun:18,Failures:0,Errors:0,Skipped:0 [INFO] [INFO]---maven-war-plugin:2.3:war(default-war)@showcase--- [INFO]Packagingwebapp [INFO]Assemblingwebapp[showcase]in[D:\springside4-4.0.1.GA\examples\showcas e\target\showcase-4.0.1.GA] [INFO]Processingwarproject [INFO]Copyingwebappresources[D:\springside4-4.0.1.GA\examples\showcase\src\m ain\webapp] [INFO]Webappassembledin[7844msecs] [INFO]Buildingwar:D:\springside4-4.0.1.GA\examples\showcase\target\showcase.w ar [INFO] [INFO]---maven-install-plugin:2.4:install(default-install)@showcase--- [INFO]InstallingD:\springside4-4.0.1.GA\examples\showcase\target\showcase.war toC:\DocumentsandSettings\admin.m2\repository\org\springside\examples\showca se\4.0.1.GA\showcase-4.0.1.GA.war [INFO]InstallingD:\springside4-4.0.1.GA\examples\showcase\pom.xmltoC:\Docume ntsandSettings\admin.m2\repository\org\springside\examples\showcase\4.0.1.GA<br/>showcase-4.0.1.GA.pom [INFO] [INFO]------------------------------------------------------------------------ [INFO]BuildingSpringside::Example4.0.1.GA [INFO]------------------------------------------------------------------------ [INFO] [INFO]---maven-install-plugin:2.4:install(default-install)@springside-examp les--- [INFO]InstallingD:\springside4-4.0.1.GA\examples\pom.xmltoC:\DocumentsandS ettings\admin.m2\repository\org\springside\examples\springside-examples\4.0.1.G A\springside-examples-4.0.1.GA.pom [INFO] [INFO]------------------------------------------------------------------------ [INFO]BuildingSpringside::Project4.0.1.GA [INFO]------------------------------------------------------------------------ Downloading:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- install-plugin/2.3.1/maven-install-plugin-2.3.1.pom Downloaded:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-i nstall-plugin/2.3.1/maven-install-plugin-2.3.1.pom(5KBat1.1KB/sec) Downloading:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- plugins/18/maven-plugins-18.pom 2013-3-2020:37:23org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirectortryExecute 信息:I/Oexception(org.apache.maven.wagon.providers.http.httpclient.NoHttpResp onseException)caughtwhenprocessingrequest:Thetargetserverfailedtorespo nd 2013-3-2020:37:23org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirectortryExecute 信息:Retryingrequest Downloaded:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-p lugins/18/maven-plugins-18.pom(13KBat1.4KB/sec) Downloading:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- install-plugin/2.3.1/maven-install-plugin-2.3.1.jar Downloaded:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-i nstall-plugin/2.3.1/maven-install-plugin-2.3.1.jar(23KBat3.3KB/sec) [INFO] [INFO]---maven-install-plugin:2.3.1:install(default-install)@springside-pro ject--- [INFO]InstallingD:\springside4-4.0.1.GA\pom.xmltoC:\DocumentsandSettings\a dmin.m2\repository\org\springside\springside-project\4.0.1.GA\springside-projec t-4.0.1.GA.pom [INFO]------------------------------------------------------------------------ [INFO]ReactorSummary: [INFO] [INFO]Springside::Module::Parent....................SUCCESS[0.985s] [INFO]Springside::Module::Test......................SUCCESS[33.515s] [INFO]Springside::Module::Core......................SUCCESS[13.766s] [INFO]Springside::Module::Extension.................SUCCESS[8.641s] [INFO]Springside::Module..............................SUCCESS[0.031s] [INFO]Springside::Example::QuickStart...............SUCCESS[27.906s] [INFO]Springside::Example::Showcase.................SUCCESS[1:18.344s] [INFO]Springside::Example.............................SUCCESS[0.062s] [INFO]Springside::Project.............................SUCCESS[20.422s] [INFO]------------------------------------------------------------------------ [INFO]BUILDSUCCESS [INFO]------------------------------------------------------------------------ [INFO]Totaltime:3:04.188s [INFO]Finishedat:WedMar2020:37:35CST2013 [INFO]FinalMemory:31M/123M [INFO]------------------------------------------------------------------------ D:\springside4-4.0.1.GA>

优选2 2020-06-09 10:29:51 0 浏览量 回答数 0

回答

回 1楼蛋蛋oo蛋蛋的帖子 好的,谢谢哈。 ------------------------- 回 3楼忠恕的帖子 请问你看我的原贴了吗?我原贴中有出错信息,有完整的代码。 调用时的出错信息是: http:/x.x.x.x errorMessage: Jsapi Should NOT Call, selector String = open:to: errorCode: 7 ------------------------- 回 5楼忠恕的帖子 请问你能直接给一个能正确执行的正向例子来确认问题吗?(是本身在任何条件下都无法正确调用,还是在某种条件下可以调用成功?) ------------------------ 我按你说的顺序调整代码,碰到了新的问题。 dd.config 之后, dd.ready 的回调就不会被触发了。iOS 和 Android 环境都一样。如下: <!DOCTYPE html><html><head><meta charset="utf-8" /><title>钉钉登录</title><script type="text/javascript" src="http://g.alicdn.com/ilw/ding/0.8.6/scripts/dingtalk.js"></script><script type="text/javascript" src="http://s.zys.me/js/jq/jquery.min.js"></script></head><body>  <script type="text/javascript">    $(function(){      $.ajax({        url: '/dingding/jsapi-sign',        data: {url: location.href},        dataType: 'json',        success: function(response){          var info = response.data;          ;(function(){            //return;            dd.config({              agentId: info.agent_id,              corpId: info.corp_id,              timeStamp: info.timestamp,              nonceStr: info.nonce,              signature: info.sign,              jsApiList: [ 'biz.util.open' ]            });          })();          dd.ready(function(){            alert('ok');          });          alert('here');        }      });    });  </script></body></html> ------------------------- Re回 7楼nuliang的帖子 dd.error() 没有内容。 <!DOCTYPE html><html><head><meta charset="utf-8" /><title>钉钉登录</title><script type="text/javascript" src="http://g.alicdn.com/ilw/ding/0.8.6/scripts/dingtalk.js"></script><script type="text/javascript" src="http://s.zys.me/js/jq/jquery.min.js"></script><script type="text/javascript" src="http://192.168.0.102:8081/target/target-script-min.js#anonymous"></script></head><body>  <script type="text/javascript">    $(function(){      $.ajax({        url: '/dingding/jsapi-sign',        data: {url: location.href},        dataType: 'json',        success: function(response){          var info = response.data;          ;(function(){            //return;            dd.config({              agentId: info.agent_id,              corpId: info.corp_id,              timeStamp: info.timestamp,              nonceStr: info.nonce,              signature: info.sign,              jsApiList: [ 'biz.util.open' ]            });          })();          dd.ready(function(){            alert('ok');          });          alert('here');          dd.error();        }      });    });  </script></body></html> ------------------------- Re回 8楼肥龙的帖子 代码就那么几行,也没有额外的报错信息。 1. 按我原来的代码, bb.biz.util.open() 调用时会报错,报错的信息我已经给出了。 2. 按后面的朋友提供的建议: 再形象些: dd.config{...} dd.ready{...} dd.error{...} 现象是 dd.ready() 这个回调不会触发。 ------------------------- Rebb.biz.util.open 报错 官方的技术支持大哥大姐们,  bb.biz.util.open()   这个 api ,烦请提供一段在你们自己的环境中可正确执行的代码片段,这不难吧? 从发贴到现在都要一个星期了 …… ------------------------- Rebb.biz.util.open 报错 今天从头梳理流程,把这个问题解决了。问题是我 jsapi 的签名处理错误。 有部分的 jsapi 应该是不验证签名的,所以之前虽然我的签名是不对的,但是因为这些 api 使用没问题,所以我一直以为我的签名没有问题。签名错的地方是对文档上写的“使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串”理解有误,之前我把 value 部分作 urlencode 了。如果签名错了,嗯,也是得不到任何反馈的,表现的现象只是在作完 dd.config 之后, dd.ready 不会触发。(这点见我上面的帖子,因为签名错误的问题,不作 dd.config 的情况下, dd.ready 可以正常触发,所以我一直这样用下来的)

zephyr 2019-12-02 02:55:59 0 浏览量 回答数 0

回答

我试了一下,发现用命令:mvn -e install 安装,就好了。可能是,在编译过程中,里面有自定义的异常抛出导致的。其实,那是测试自定义异常的一个测试,出现这个异常,说明是正常的。如果不出现这个异常,才是有问题。######已修复,请更新。######我今天刚试了,还是不行哦!######我今天也试了,还是不行啊######我今天也试了,不行啊 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3. 0:compile (default-compile) on project springside-test: Fatal error compiling: C ompilerException: IllegalArgumentException: Illegal character in path at index 1 7: jar:/C:/Documents and Settings/admin/.m2 ###### 用命令 mvn -e install又执行了一遍, 又报:[INFO] Springside :: Example :: QuickStart ............... FAILURE [5:40.593s] [ERROR] Failed to execute goal on project quickstart: Could not resolve dependen cies for project org.springside.examples:quickstart:war:4.0.1.GA: The following artifacts could not be resolved: javax.mail:mail:jar:1.4, javax.activation:activ ation:jar:1.1, commons-io:commons-io:jar:2.2: Could not transfer artifact javax. mail:mail:jar:1.4 from/to central (http://repo.maven.apache.org/maven2): Connect ion to http://repo.maven.apache.org refused: Connection timed out: connect -> [H elp 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o n project quickstart: Could not resolve dependencies for project org.springside. examples:quickstart:war:4.0.1.GA: The following artifacts could not be resolved: javax.mail:mail:jar:1.4, javax.activation:activation:jar:1.1, commons-io:common s-io:jar:2.2: Could not transfer artifact javax.mail:mail:jar:1.4 from/to centra l (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache. org refused ######又试了几次终于成功了,建议用小红伞的先暂关闭一下。 2013-03-20 20:35:43,875 [main] INFO  [org.springside.examples.quickstart.reposit ory.JpaMappingTest] - ok: User 2013-03-20 20:35:43,921 [main] INFO  [org.springside.examples.quickstart.reposit Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.422 sec Running org.springside.examples.quickstart.repository.TaskDaoTest 2013-03-20 20:35:44,312 [main] WARN  [org.springframework.aop.framework.Cglib2Ao pProxy] - Unable to proxy method [public final void org.springframework.test.con text.junit4.AbstractJUnit4SpringContextTests.setApplicationContext(org.springfra mework.context.ApplicationContext)] because it is final: All calls to this metho d via a proxy will be routed directly to the proxy. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.469 sec Running org.springside.examples.quickstart.service.account.AccountServiceTest 2013-03-20 20:35:44,968 [main] WARN  [org.springside.examples.quickstart.service .account.AccountService] - 操作员foo尝试删除超级管理员用户 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.562 sec Results : Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-war-plugin:2.3:war (default-war) @ quickstart --- [INFO] Packaging webapp [INFO] Assembling webapp [quickstart] in [D:\springside4-4.0.1.GA\examples\quick start\target\quickstart-4.0.1.GA] [INFO] Processing war project [INFO] Copying webapp resources [D:\springside4-4.0.1.GA\examples\quickstart\src \main\webapp] [INFO] Webapp assembled in [7094 msecs] [INFO] Building war: D:\springside4-4.0.1.GA\examples\quickstart\target\quicksta rt.war [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ quickstart --- [INFO] Installing D:\springside4-4.0.1.GA\examples\quickstart\target\quickstart. war to C:\Documents and Settings\admin\.m2\repository\org\springside\examples\qu ickstart\4.0.1.GA\quickstart-4.0.1.GA.war [INFO] Installing D:\springside4-4.0.1.GA\examples\quickstart\pom.xml to C:\Docu ments and Settings\admin\.m2\repository\org\springside\examples\quickstart\4.0.1 .GA\quickstart-4.0.1.GA.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Springside :: Example :: Showcase 4.0.1.GA [INFO] ------------------------------------------------------------------------ Downloading: http://repo.maven.apache.org/maven2/org/jasypt/jasypt/1.9.0/jasypt- 1.9.0.jar 2013-3-20 20:36:12 org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirector tryExecute 信息: I/O exception (org.apache.maven.wagon.providers.http.httpclient.NoHttpResp onseException) caught when processing request: The target server failed to respo nd 2013-3-20 20:36:12 org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirector tryExecute 信息: Retrying request Downloaded: http://repo.maven.apache.org/maven2/org/jasypt/jasypt/1.9.0/jasypt-1 .9.0.jar (123 KB at 7.7 KB/sec) [INFO] [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-banned-dependencies) @ sho wcase --- [INFO] [INFO] --- build-helper-maven-plugin:1.7:add-test-source (add-source) @ showcase  --- [INFO] Test Source directory: D:\springside4-4.0.1.GA\examples\showcase\src\test \functional added. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ showcase - -- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 28 resources [INFO] [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ showcase --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 62 source files to D:\springside4-4.0.1.GA\examples\showcase\ta rget\classes [WARNING] 注意:某些输入文件使用了未经检查或不安全的操作。 [WARNING] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sh owcase --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 6 resources [INFO] [INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ showcas e --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 22 source files to D:\springside4-4.0.1.GA\examples\showcase\ta rget\test-classes [WARNING] 注意:某些输入文件使用了未经检查或不安全的操作。 [WARNING] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ showcase --- [INFO] Surefire report directory: D:\springside4-4.0.1.GA\examples\showcase\targ et\surefire-reports [INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCorePr ovider -------------------------------------------------------  T E S T S ------------------------------------------------------- Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, u seUnlimitedThreads=false Running org.springside.examples.showcase.demos.jms.JmsAdvancedTest 2013-03-20 20:36:27,656 [main] ERROR org.apache.activemq.broker.BrokerService -T emporary Store limit is 51200 mb, whilst the temporary data directory: D:\spring side4-4.0.1.GA\examples\showcase\activemq-data\showcase\tmp_storage only has 794 7 mb of usable space 2013-03-20 20:36:29,218 [advancedTopicContainer-1] INFO  s.advanced.AdvancedNoti fyMessageListener -UserName:calvin, Email:calvin@sringside.org.cn, ObjectType:us er 2013-03-20 20:36:33,234 [advancedQueueContainer-3] INFO  s.advanced.AdvancedNoti fyMessageListener -UserName:calvin, Email:calvin@sringside.org.cn, ObjectType:us er Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.891 sec Running org.springside.examples.showcase.demos.jms.JmsSimpleTest 2013-03-20 20:36:37,109 [main] ERROR org.apache.activemq.broker.BrokerService -T emporary Store limit is 51200 mb, whilst the temporary data directory: D:\spring side4-4.0.1.GA\examples\showcase\activemq-data\showcase\tmp_storage only has 794 7 mb of usable space 2013-03-20 20:36:38,140 [main] INFO  xamples.showcase.demos.jms.JmsSimpleTest -s ended message 2013-03-20 20:36:38,140 [topicContainer-1] INFO  e.demos.jms.simple.NotifyMessag eListener -UserName:calvin, Email:calvin@sringside.org.cn 2013-03-20 20:36:40,156 [queueContainer-10] INFO  e.demos.jms.simple.NotifyMessa geListener -UserName:calvin, Email:calvin@sringside.org.cn 2013-03-20 20:36:40,156 [main] INFO  xamples.showcase.demos.jms.JmsSimpleTest -s ended message Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.719 sec Running org.springside.examples.showcase.demos.mail.MailServiceTest 2013-03-20 20:36:44,093 [main] INFO  se.demos.utilities.email.MimeMailService -H TML版邮件已发送至springside3.demo @gmail.com <html> <head>用户修改通知</head> <body>         <h1>用户calvin被修改.</h1> </body> </html> 2013-03-20 20:36:44,125 [main] INFO  .demos.utilities.email.SimpleMailService - 纯文本邮件已发送至springside3.demo @gmail.com                         用戶calvin在2013-03-20被修改.                                         System Administrator. Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.844 sec Running org.springside.examples.showcase.demos.schedule.JdkTimerJobTest 2013-03-20 20:36:45,734 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. 2013-03-20 20:36:47,046 [JdkTimerJob-0] INFO  showcase.demos.schedule.UserCountS canner -There are 6 user in database, printed by jdk timer job. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.609 sec Running org.springside.examples.showcase.demos.schedule.QuartzTimerClusterJobTes t 2013-03-20 20:36:50,281 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. 2013-03-20 20:36:52,453 [clusterQuartzScheduler_Worker-1] INFO  case.demos.sched ule.QuartzClusterableJob -There are 6 user in database, printed by quartz cluste r job on node default. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.265 sec Running org.springside.examples.showcase.demos.schedule.SpringTimerJobTest 2013-03-20 20:36:55,593 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. 2013-03-20 20:36:55,609 [springScheduler-2] INFO  showcase.demos.schedule.UserCo untScanner -There are 6 user in database, printed by spring timer job by xml. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.953 sec Running org.springside.examples.showcase.demos.web.CacheControlHeaderFilterTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 sec Running org.springside.examples.showcase.repository.jpa.DynamicSpecificationTest 2013-03-20 20:36:58,515 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.015 sec Running org.springside.examples.showcase.repository.jpa.JpaMappingTest 2013-03-20 20:36:58,812 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. 2013-03-20 20:36:58,843 [main] INFO  s.showcase.repository.jpa.JpaMappingTest -o k: User 2013-03-20 20:36:58,843 [main] INFO  s.showcase.repository.jpa.JpaMappingTest -o k: Team 2013-03-20 20:36:58,859 [main] INFO  s.showcase.repository.jpa.JpaMappingTest -o k: Role Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 sec Running org.springside.examples.showcase.repository.mybatis.TeamMybatisDaoTest 2013-03-20 20:36:59,921 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.281 sec Running org.springside.examples.showcase.repository.mybatis.UserMybatisDaoTest 2013-03-20 20:37:00,953 [main] WARN  ngframework.aop.framework.Cglib2AopProxy -U nable to proxy method [public final void org.springframework.test.context.junit4 .AbstractJUnit4SpringContextTests.setApplicationContext(org.springframework.cont ext.ApplicationContext)] because it is final: All calls to this method via a pro xy will be routed directly to the proxy. Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.875 sec Running org.springside.examples.showcase.service.AccountServiceTest 2013-03-20 20:37:01,531 [main] WARN  examples.showcase.service.AccountService - 操作员foo尝试修改超级管理员用户 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.421 sec Results : Tests run: 18, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-war-plugin:2.3:war (default-war) @ showcase --- [INFO] Packaging webapp [INFO] Assembling webapp [showcase] in [D:\springside4-4.0.1.GA\examples\showcas e\target\showcase-4.0.1.GA] [INFO] Processing war project [INFO] Copying webapp resources [D:\springside4-4.0.1.GA\examples\showcase\src\m ain\webapp] [INFO] Webapp assembled in [7844 msecs] [INFO] Building war: D:\springside4-4.0.1.GA\examples\showcase\target\showcase.w ar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ showcase --- [INFO] Installing D:\springside4-4.0.1.GA\examples\showcase\target\showcase.war to C:\Documents and Settings\admin\.m2\repository\org\springside\examples\showca se\4.0.1.GA\showcase-4.0.1.GA.war [INFO] Installing D:\springside4-4.0.1.GA\examples\showcase\pom.xml to C:\Docume nts and Settings\admin\.m2\repository\org\springside\examples\showcase\4.0.1.GA\ showcase-4.0.1.GA.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Springside :: Example 4.0.1.GA [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ springside-examp les --- [INFO] Installing D:\springside4-4.0.1.GA\examples\pom.xml to C:\Documents and S ettings\admin\.m2\repository\org\springside\examples\springside-examples\4.0.1.G A\springside-examples-4.0.1.GA.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Springside :: Project 4.0.1.GA [INFO] ------------------------------------------------------------------------ Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- install-plugin/2.3.1/maven-install-plugin-2.3.1.pom Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-i nstall-plugin/2.3.1/maven-install-plugin-2.3.1.pom (5 KB at 1.1 KB/sec) Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- plugins/18/maven-plugins-18.pom 2013-3-20 20:37:23 org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirector tryExecute 信息: I/O exception (org.apache.maven.wagon.providers.http.httpclient.NoHttpResp onseException) caught when processing request: The target server failed to respo nd 2013-3-20 20:37:23 org.apache.maven.wagon.providers.http.httpclient.impl.client. DefaultRequestDirector tryExecute 信息: Retrying request Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-p lugins/18/maven-plugins-18.pom (13 KB at 1.4 KB/sec) Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- install-plugin/2.3.1/maven-install-plugin-2.3.1.jar Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-i nstall-plugin/2.3.1/maven-install-plugin-2.3.1.jar (23 KB at 3.3 KB/sec) [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ springside-pro ject --- [INFO] Installing D:\springside4-4.0.1.GA\pom.xml to C:\Documents and Settings\a dmin\.m2\repository\org\springside\springside-project\4.0.1.GA\springside-projec t-4.0.1.GA.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Springside :: Module :: Parent .................... SUCCESS [0.985s] [INFO] Springside :: Module :: Test ...................... SUCCESS [33.515s] [INFO] Springside :: Module :: Core ...................... SUCCESS [13.766s] [INFO] Springside :: Module :: Extension ................. SUCCESS [8.641s] [INFO] Springside :: Module .............................. SUCCESS [0.031s] [INFO] Springside :: Example :: QuickStart ............... SUCCESS [27.906s] [INFO] Springside :: Example :: Showcase ................. SUCCESS [1:18.344s] [INFO] Springside :: Example ............................. SUCCESS [0.062s] [INFO] Springside :: Project ............................. SUCCESS [20.422s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:04.188s [INFO] Finished at: Wed Mar 20 20:37:35 CST 2013 [INFO] Final Memory: 31M/123M [INFO] ------------------------------------------------------------------------ D:\springside4-4.0.1.GA>

爱吃鱼的程序员 2020-05-29 20:07:26 0 浏览量 回答数 0

问题

怎么解决mysql 事务没有提交导致锁等待?报错

爱吃鱼的程序员 2020-06-10 15:32:12 3 浏览量 回答数 1

问题

最佳实践-PostgreSQL-PostgreSQL UPSERT 的功能与用法

李沃晟 2019-12-01 21:40:21 558 浏览量 回答数 0

回答

mysql5.0.3及以前版本varchar类型最大长度是255字符, 之后版本理论上长度可取值范围是1到65535字节,但实际上不可能取到这么大的值,原因是65535字节是mysql1行数据占用的长度。所以单个字段是不可能占用这么大的空间的。 那如果是你设置的值过大,mysql怎么处理呢? 根据设置的sql_mode不同会有两种情况: mysql会把varchar类型转成text类型并产生一个warning; MySQL报错; 学习回复 @喂马:如果utf8的话一行最大长度为21845,gbk的32767,然后多字段平分?回复 @苏生不惑:这个是和字符集有关系的,因为65535指的是字节,所以具体能有多少个字符你可以尝试一下如果一行只有一个字段,那就可以到65535了? 你的mysql知识上哪学的? 体育老师教的?  varchar最大255. 回复 @小虫0302:真不知道你们怎么当上程序员的呵呵,你的经验是老黄历了。确认一下你mysql的版本? 1118是行的长度过长,这个异常返回的说明里面会告诉你限制是多少,和mysql版本,引擎和编码都有关系。不过你这个语句在5.6上执行我并没有发现有报错。 引用来自“逝水fox”的答案 1118是行的长度过长,这个异常返回的说明里面会告诉你限制是多少,和mysql版本,引擎和编码都有关系。不过你这个语句在5.6上执行我并没有发现有报错。 我测试了下mysql5.0.45按你的sql执行后没问题 mysql>descnewtable;+-------------+------------------+------+-----+---------+----------------+|Field|Type|Null|Key|Default|Extra|+-------------+------------------+------+-----+---------+----------------+|goods_id|int(11)unsigned|NO|PRI|NULL|auto_increment||cat_id|int(11)|YES||NULL|||type_id|int(11)|YES||NULL|||brand_id|int(11)|YES||NULL|||goods_brand|varchar(200)|YES||NULL|||goods_brief|varchar(1000)|YES||NULL|||goods_info|varchar(2000)|YES||NULL|||goods_price|int(10)|YES||NULL||+-------------+------------------+------+-----+---------+----------------+8rowsinset(0.01sec) mysql>insertintonewtablesetgoods_info='MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0';QueryOK,1rowaffected(0.00sec) mysql>selectlength(goods_info)fromnewtablewheregoods_id=1;+--------------------+|length(goods_info)|+--------------------+|680|+--------------------+1rowinset(0.00sec) 引用来自“苏生不惑”的答案 我测试了下mysql5.0.45按你的sql执行后没问题 mysql>descnewtable;+-------------+------------------+------+-----+---------+----------------+|Field|Type|Null|Key|Default|Extra|+-------------+------------------+------+-----+---------+----------------+|goods_id|int(11)unsigned|NO|PRI|NULL|auto_increment||cat_id|int(11)|YES||NULL|||type_id|int(11)|YES||NULL|||brand_id|int(11)|YES||NULL|||goods_brand|varchar(200)|YES||NULL|||goods_brief|varchar(1000)|YES||NULL|||goods_info|varchar(2000)|YES||NULL|||goods_price|int(10)|YES||NULL||+-------------+------------------+------+-----+---------+----------------+8rowsinset(0.01sec) mysql>insertintonewtablesetgoods_info='MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0MyISAMDEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ciCHECKSUM=0';QueryOK,1rowaffected(0.00sec) mysql>selectlength(goods_info)fromnewtablewheregoods_id=1;+--------------------+|length(goods_info)|+--------------------+|680|+--------------------+1rowinset(0.00sec) 为啥不用text类型?顶我是来看评论的 引用来自“mark35”的答案 为啥不用text类型?

爱吃鱼的程序员 2020-06-22 14:30:27 0 浏览量 回答数 0

问题

错误,spark-submit --master yarn --deploy-mode cluster

社区小助手 2019-12-01 19:29:06 1103 浏览量 回答数 1

回答

这个需求用窗口查询很方便,在PostgreSQL里可以这样查询:digoal=# create table test(id int, info text,point int); CREATE TABLE digoal=# insert into test values (1, 'a', 100); INSERT 0 1 digoal=# insert into test values (2, 'a', 101); INSERT 0 1 digoal=# insert into test values (3, 'b', 90); INSERT 0 1 digoal=# insert into test values (4, 'c', 10); INSERT 0 1 digoal=# select row_number() over(order by point desc) rn,* from test order by rn; rn | id | info | point ----+----+------+------- 1 | 2 | a | 101 2 | 1 | a | 100 3 | 3 | b | 90 4 | 4 | c | 10 (4 rows)

德哥 2019-12-02 01:44:36 0 浏览量 回答数 0

问题

请教:怎么获得备案服务号?

梦之怪蜀黍 2019-12-01 20:58:13 3963 浏览量 回答数 4

问题

Python-通过Airflow DAG进行数据流作业

养狐狸的猫 2019-12-01 19:58:20 2 浏览量 回答数 0

问题

最佳实践-PostgreSQL-批量更新、删除或插入数据

李沃晟 2019-12-01 21:40:22 670 浏览量 回答数 0

问题

web开发问题,实现点击图标和其余空白地方,跳转到不同的页面

a123456678 2019-12-01 19:32:20 960 浏览量 回答数 1

问题

文件。写不会写的文件,但正常的文本会-为什么会发生这种情况?

kun坤 2019-12-28 14:22:44 0 浏览量 回答数 1

问题

springcloud eureka Read timed out?报错

爱吃鱼的程序员 2020-06-08 11:05:58 0 浏览量 回答数 0

回答

HI,要搞清楚锁,首先要搞清楚,PG是有很多可以加锁的对象的,每种对象下面,再去看它的锁冲突。 可以加锁的对象: LOCKTAG_RELATION, /* whole relation */ /* ID info for a relation is DB OID + REL OID; DB OID = 0 if shared */ LOCKTAG_RELATION_EXTEND, /* the right to extend a relation */ /* same ID info as RELATION */ LOCKTAG_PAGE, /* one page of a relation */ /* ID info for a page is RELATION info + BlockNumber */ LOCKTAG_TUPLE, /* one physical tuple */ /* ID info for a tuple is PAGE info + OffsetNumber */ LOCKTAG_TRANSACTION, /* transaction (for waiting for xact done) */ /* ID info for a transaction is its TransactionId */ LOCKTAG_VIRTUALTRANSACTION, /* virtual transaction (ditto) */ /* ID info for a virtual transaction is its VirtualTransactionId */ LOCKTAG_SPECULATIVE_TOKEN, /* speculative insertion Xid and token */ /* ID info for a transaction is its TransactionId */ LOCKTAG_OBJECT, /* non-relation database object */ /* ID info for an object is DB OID + CLASS OID + OBJECT OID + SUBID */ /* * Note: object ID has same representation as in pg_depend and * pg_description, but notice that we are constraining SUBID to 16 bits. * Also, we use DB OID = 0 for shared objects such as tablespaces. */ LOCKTAG_USERLOCK, /* reserved for old contrib/userlock code */ LOCKTAG_ADVISORY /* advisory user locks */ 锁模式 /* NoLock is not a lock mode, but a flag value meaning "don't get a lock" */ #define NoLock 0 #define AccessShareLock 1 /* SELECT */ #define RowShareLock 2 /* SELECT FOR UPDATE/FOR SHARE */ #define RowExclusiveLock 3 /* INSERT, UPDATE, DELETE */ #define ShareUpdateExclusiveLock 4 /* VACUUM (non-FULL),ANALYZE, CREATE * INDEX CONCURRENTLY */ #define ShareLock 5 /* CREATE INDEX (WITHOUT CONCURRENTLY) */ #define ShareRowExclusiveLock 6 /* like EXCLUSIVE MODE, but allows ROW * SHARE */ #define ExclusiveLock 7 /* blocks ROW SHARE/SELECT...FOR * UPDATE */ #define AccessExclusiveLock 8 /* ALTER TABLE, DROP TABLE, VACUUM * FULL, and unqualified LOCK TABLE */ 然后我们说一下死锁,死锁相互等待造成的,你给的图没有等待,所以一定不是死锁。 最后提供一个查询锁和等待的方法给你,会比较好看。 用一个函数来将锁转换为数字, postgres=# create or replace function f_lock_level(i_mode text) returns int as $$ declare begin case i_mode when 'INVALID' then return 0; when 'AccessShareLock' then return 1; when 'RowShareLock' then return 2; when 'RowExclusiveLock' then return 3; when 'ShareUpdateExclusiveLock' then return 4; when 'ShareLock' then return 5; when 'ShareRowExclusiveLock' then return 6; when 'ExclusiveLock' then return 7; when 'AccessExclusiveLock' then return 8; else return 0; end case; end; $$ language plpgsql strict; 修改查询语句,按锁级别排序: with t_wait as (select a.mode,a.locktype,a.database,a.relation,a.page,a.tuple,a.classid,a.objid,a.objsubid, a.pid,a.virtualtransaction,a.virtualxid,a,transactionid,b.query,b.xact_start,b.query_start, b.usename,b.datname from pg_locks a,pg_stat_activity b where a.pid=b.pid and not a.granted), t_run as (select a.mode,a.locktype,a.database,a.relation,a.page,a.tuple,a.classid,a.objid,a.objsubid, a.pid,a.virtualtransaction,a.virtualxid,a,transactionid,b.query,b.xact_start,b.query_start, b.usename,b.datname from pg_locks a,pg_stat_activity b where a.pid=b.pid and a.granted) select r.locktype,r.mode r_mode,r.usename r_user,r.datname r_db,r.relation::regclass,r.pid r_pid, r.page r_page,r.tuple r_tuple,r.xact_start r_xact_start,r.query_start r_query_start, now()-r.query_start r_locktime,r.query r_query,w.mode w_mode,w.pid w_pid,w.page w_page, w.tuple w_tuple,w.xact_start w_xact_start,w.query_start w_query_start, now()-w.query_start w_locktime,w.query w_query from t_wait w,t_run r where r.locktype is not distinct from w.locktype and r.database is not distinct from w.database and r.relation is not distinct from w.relation and r.page is not distinct from w.page and r.tuple is not distinct from w.tuple and r.classid is not distinct from w.classid and r.objid is not distinct from w.objid and r.objsubid is not distinct from w.objsubid and r.transactionid is not distinct from w.transactionid and r.pid <> w.pid order by f_lock_level(w.mode)+f_lock_level(r.mode) desc,r.xact_start; 现在可以排在前面的就是锁级别高的等待,优先干掉这个。 -[ RECORD 1 ]-+--------------------------------------------------------------------- locktype | relation -- 冲突类型 r_mode | ShareUpdateExclusiveLock -- 持锁模式 r_user | postgres -- 持锁用户 r_db | postgres -- 持锁数据库 relation | tbl -- 持锁对象 r_pid | 25656 -- 持锁进程 r_xact_start | 2015-05-10 14:11:16.08318+08 -- 持锁事务开始时间 r_query_start | 2015-05-10 14:11:16.08318+08 -- 持锁SQL开始时间 r_locktime | 00:01:49.460779 -- 持锁时长 r_query | vacuum freeze tbl; -- 持锁SQL,注意不一定是这个SQL带来的锁,也有可能是这个事务在之前执行的SQL加的锁 w_mode | AccessExclusiveLock -- 等待锁模式 w_pid | 26731 -- 等待锁进程 w_xact_start | 2015-05-10 14:11:17.987362+08 -- 等待锁事务开始时间 w_query_start | 2015-05-10 14:11:17.987362+08 -- 等待锁SQL开始时间 w_locktime | 00:01:47.556597 -- 等待锁时长 w_query | truncate tbl; -- 等待锁SQL -[ RECORD 2 ]-+--------------------------------------------------------------------- locktype | relation r_mode | ShareUpdateExclusiveLock r_user | postgres r_db | postgres relation | tbl r_pid | 25656 r_xact_start | 2015-05-10 14:11:16.08318+08 r_query_start | 2015-05-10 14:11:16.08318+08 r_locktime | 00:01:49.460779 r_query | vacuum freeze tbl; w_mode | RowExclusiveLock w_pid | 25582 w_xact_start | 2015-05-10 14:11:22.845+08 w_query_start | 2015-05-10 14:11:22.845+08 w_locktime | 00:01:42.698959 w_query | insert into tbl(crt_time) select now() from generate_series(1,1000); -- 这个SQL其实等待的是truncate tbl的锁; ......

德哥 2019-12-02 01:29:55 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:16 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:14 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:13 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:16 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:14 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:15 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:15 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:14 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:15 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:15 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档1. Windows 主机系统的虚拟主机,在 主机管理控制台 可以添加系统支持的 MIME 的类型。操作的方式:登录 主机管理控制台 >   管理 > 站点信息 > 高级环境设置 > MIME类型设置。MIME 类型如果不知道,请查看文档最后列出的常用类型介绍。比如添加 pdf 类型 :第一个方框(文件类型)填写 .pdf ,第二个(应用程序)填写 application/pdf 。 2. Linux 系统的虚拟主机,无法在控制面板操作,需要编写伪静态规则文件添加。2.1 找到伪静态文件 .htaccess  FTP 显示隐藏文件  .htaccess  参考这里。2.2 在本地编辑 .htaccess 文件添加的规则如下(这里举例是mp4,支持添加多条)AddHandler audio/mp4 .mp4 3. 常用MIME类型介绍 格式前面为后辍名,后面为对应的 MIME 型例如:rar application/x-rar-compressed  表示 rar 对应的是application/x-rar-compressed { “.323”, “text/h323” },{ “.3gp”, “video/3gpp” },{ “.aab”, “application/x-authoware-bin” },{ “.aam”, “application/x-authoware-map” },{ “.aas”, “application/x-authoware-seg” },{ “.acx”, “application/internet-property-stream” },{ “.ai”, “application/postscript” },{ “.aif”, “audio/x-aiff” },{ “.aifc”, “audio/x-aiff” },{ “.aiff”, “audio/x-aiff” },{ “.als”, “audio/X-Alpha5” },{ “.amc”, “application/x-mpeg” },{ “.ani”, “application/octet-stream” },{ “.apk”, “application/vnd.android.package-archive” },{ “.asc”, “text/plain” },{ “.asd”, “application/astound” },{ “.asf”, “video/x-ms-asf” },{ “.asn”, “application/astound” },{ “.asp”, “application/x-asap” },{ “.asr”, “video/x-ms-asf” },{ “.asx”, “video/x-ms-asf” },{ “.au”, “audio/basic” },{ “.avb”, “application/octet-stream” },{ “.avi”, “video/x-msvideo” },{ “.awb”, “audio/amr-wb” },{ “.axs”, “application/olescript” },{ “.bas”, “text/plain” },{ “.bcpio”, “application/x-bcpio” },{ “.bin “, “application/octet-stream” },{ “.bld”, “application/bld” },{ “.bld2”, “application/bld2” },{ “.bmp”, “image/bmp” },{ “.bpk”, “application/octet-stream” },{ “.bz2”, “application/x-bzip2” },{ “.c”, “text/plain” },{ “.cal”, “image/x-cals” },{ “.cat”, “application/vnd.ms-pkiseccat” },{ “.ccn”, “application/x-cnc” },{ “.cco”, “application/x-cocoa” },{ “.cdf”, “application/x-cdf” },{ “.cer”, “application/x-x509-ca-cert” },{ “.cgi”, “magnus-internal/cgi” },{ “.chat”, “application/x-chat” },{ “.class”, “application/octet-stream” },{ “.clp”, “application/x-msclip” },{ “.cmx”, “image/x-cmx” },{ “.co”, “application/x-cult3d-object” },{ “.cod”, “image/cis-cod” },{ “.conf”, “text/plain” },{ “.cpio”, “application/x-cpio” },{ “.cpp”, “text/plain” },{ “.cpt”, “application/mac-compactpro” },{ “.crd”, “application/x-mscardfile” },{ “.crl”, “application/pkix-crl” },{ “.crt”, “application/x-x509-ca-cert” },{ “.csh”, “application/x-csh” },{ “.csm”, “chemical/x-csml” },{ “.csml”, “chemical/x-csml” },{ “.css”, “text/css” },{ “.cur”, “application/octet-stream” },{ “.dcm”, “x-lml/x-evm” },{ “.dcr”, “application/x-director” },{ “.dcx”, “image/x-dcx” },{ “.der”, “application/x-x509-ca-cert” },{ “.dhtml”, “text/html” },{ “.dir”, “application/x-director” },{ “.dll”, “application/x-msdownload” },{ “.dmg”, “application/octet-stream” },{ “.dms”, “application/octet-stream” },{ “.doc”, “application/msword” },{ “.docx”, “application/vnd.openxmlformats-officedocument.wordprocessingml.document” },{ “.dot”, “application/msword” },{ “.dvi”, “application/x-dvi” },{ “.dwf”, “drawing/x-dwf” },{ “.dwg”, “application/x-autocad” },{ “.dxf”, “application/x-autocad” },{ “.dxr”, “application/x-director” },{ “.ebk”, “application/x-expandedbook” },{ “.emb”, “chemical/x-embl-dl-nucleotide” },{ “.embl”, “chemical/x-embl-dl-nucleotide” },{ “.eps”, “application/postscript” },{ “.epub”, “application/epub+zip” },{ “.eri”, “image/x-eri” },{ “.es”, “audio/echospeech” },{ “.esl”, “audio/echospeech” },{ “.etc”, “application/x-earthtime” },{ “.etx”, “text/x-setext” },{ “.evm”, “x-lml/x-evm” },{ “.evy”, “application/envoy” },{ “.exe”, “application/octet-stream” },{ “.fh4”, “image/x-freehand” },{ “.fh5”, “image/x-freehand” },{ “.fhc”, “image/x-freehand” },{ “.fif”, “application/fractals” },{ “.flr”, “x-world/x-vrml” },{ “.flv”, “flv-application/octet-stream” },{ “.fm”, “application/x-maker” },{ “.fpx”, “image/x-fpx” },{ “.fvi”, “video/isivideo” },{ “.gau”, “chemical/x-gaussian-input” },{ “.gca”, “application/x-gca-compressed” },{ “.gdb”, “x-lml/x-gdb” },{ “.gif”, “image/gif” },{ “.gps”, “application/x-gps” },{ “.gtar”, “application/x-gtar” },{ “.gz”, “application/x-gzip” },{ “.h”, “text/plain” },{ “.hdf”, “application/x-hdf” },{ “.hdm”, “text/x-hdml” },{ “.hdml”, “text/x-hdml” },{ “.hlp”, “application/winhlp” },{ “.hqx”, “application/mac-binhex40” },{ “.hta”, “application/hta” },{ “.htc”, “text/x-component” },{ “.htm”, “text/html” },{ “.html”, “text/html” },{ “.hts”, “text/html” },{ “.htt”, “text/webviewhtml” },{ “.ice”, “x-conference/x-cooltalk” },{ “.ico”, “image/x-icon” },{ “.ief”, “image/ief” },{ “.ifm”, “image/gif” },{ “.ifs”, “image/ifs” },{ “.iii”, “application/x-iphone” },{ “.imy”, “audio/melody” },{ “.ins”, “application/x-internet-signup” },{ “.ips”, “application/x-ipscript” },{ “.ipx”, “application/x-ipix” },{ “.isp”, “application/x-internet-signup” },{ “.it”, “audio/x-mod” },{ “.itz”, “audio/x-mod” },{ “.ivr”, “i-world/i-vrml” },{ “.j2k”, “image/j2k” },{ “.jad”, “text/vnd.sun.j2me.app-descriptor” },{ “.jam”, “application/x-jam” },{ “.jar”, “application/java-archive” },{ “.java”, “text/plain” },{ “.jfif”, “image/pipeg” },{ “.jnlp”, “application/x-java-jnlp-file” },{ “.jpe”, “image/jpeg” },{ “.jpeg”, “image/jpeg” },{ “.jpg”, “image/jpeg” },{ “.jpz”, “image/jpeg” },{ “.js”, “application/x-javascript” },{ “.jwc”, “application/jwc” },{ “.kjx”, “application/x-kjx” },{ “.lak”, “x-lml/x-lak” },{ “.latex”, “application/x-latex” },{ “.lcc”, “application/fastman” },{ “.lcl”, “application/x-digitalloca” },{ “.lcr”, “application/x-digitalloca” },{ “.lgh”, “application/lgh” },{ “.lha”, “application/octet-stream” },{ “.lml”, “x-lml/x-lml” },{ “.lmlpack”, “x-lml/x-lmlpack” },{ “.log”, “text/plain” },{ “.lsf”, “video/x-la-asf” },{ “.lsx”, “video/x-la-asf” },{ “.lzh”, “application/octet-stream” },{ “.m13”, “application/x-msmediaview” },{ “.m14”, “application/x-msmediaview” },{ “.m15”, “audio/x-mod” },{ “.m3u”, “audio/x-mpegurl” },{ “.m3url”, “audio/x-mpegurl” },{ “.m4a”, “audio/mp4a-latm” },{ “.m4b”, “audio/mp4a-latm” },{ “.m4p”, “audio/mp4a-latm” },{ “.m4u”, “video/vnd.mpegurl” },{ “.m4v”, “video/x-m4v” },{ “.ma1”, “audio/ma1” },{ “.ma2”, “audio/ma2” },{ “.ma3”, “audio/ma3” },{ “.ma5”, “audio/ma5” },{ “.man”, “application/x-troff-man” },{ “.map”, “magnus-internal/imagemap” },{ “.mbd”, “application/mbedlet” },{ “.mct”, “application/x-mascot” },{ “.mdb”, “application/x-msaccess” },{ “.mdz”, “audio/x-mod” },{ “.me”, “application/x-troff-me” },{ “.mel”, “text/x-vmel” },{ “.mht”, “message/rfc822” },{ “.mhtml”, “message/rfc822” },{ “.mi”, “application/x-mif” },{ “.mid”, “audio/mid” },{ “.midi”, “audio/midi” },{ “.mif”, “application/x-mif” },{ “.mil”, “image/x-cals” },{ “.mio”, “audio/x-mio” },{ “.mmf”, “application/x-skt-lbs” },{ “.mng”, “video/x-mng” },{ “.mny”, “application/x-msmoney” },{ “.moc”, “application/x-mocha” },{ “.mocha”, “application/x-mocha” },{ “.mod”, “audio/x-mod” },{ “.mof”, “application/x-yumekara” },{ “.mol”, “chemical/x-mdl-molfile” },{ “.mop”, “chemical/x-mopac-input” },{ “.mov”, “video/quicktime” },{ “.movie”, “video/x-sgi-movie” },{ “.mp2”, “video/mpeg” },{ “.mp3”, “audio/mpeg” },{ “.mp4”, “video/mp4” },{ “.mpa”, “video/mpeg” },{ “.mpc”, “application/vnd.mpohun.certificate” },{ “.mpe”, “video/mpeg” },{ “.mpeg”, “video/mpeg” },{ “.mpg”, “video/mpeg” },{ “.mpg4”, “video/mp4” },{ “.mpga”, “audio/mpeg” },{ “.mpn”, “application/vnd.mophun.application” },{ “.mpp”, “application/vnd.ms-project” },{ “.mps”, “application/x-mapserver” },{ “.mpv2”, “video/mpeg” },{ “.mrl”, “text/x-mrml” },{ “.mrm”, “application/x-mrm” },{ “.ms”, “application/x-troff-ms” },{ “.msg”, “application/vnd.ms-outlook” },{ “.mts”, “application/metastream” },{ “.mtx”, “application/metastream” },{ “.mtz”, “application/metastream” },{ “.mvb”, “application/x-msmediaview” },{ “.mzv”, “application/metastream” },{ “.nar”, “application/zip” },{ “.nbmp”, “image/nbmp” },{ “.nc”, “application/x-netcdf” },{ “.ndb”, “x-lml/x-ndb” },{ “.ndwn”, “application/ndwn” },{ “.nif”, “application/x-nif” },{ “.nmz”, “application/x-scream” },{ “.nokia-op-logo”, “image/vnd.nok-oplogo-color” },{ “.npx”, “application/x-netfpx” },{ “.nsnd”, “audio/nsnd” },{ “.nva”, “application/x-neva1” },{ “.nws”, “message/rfc822” },{ “.oda”, “application/oda” },{ “.ogg”, “audio/ogg” },{ “.oom”, “application/x-AtlasMate-Plugin” },{ “.p10”, “application/pkcs10” },{ “.p12”, “application/x-pkcs12” },{ “.p7b”, “application/x-pkcs7-certificates” },{ “.p7c”, “application/x-pkcs7-mime” },{ “.p7m”, “application/x-pkcs7-mime” },{ “.p7r”, “application/x-pkcs7-certreqresp” },{ “.p7s”, “application/x-pkcs7-signature” },{ “.pac”, “audio/x-pac” },{ “.pae”, “audio/x-epac” },{ “.pan”, “application/x-pan” },{ “.pbm”, “image/x-portable-bitmap” },{ “.pcx”, “image/x-pcx” },{ “.pda”, “image/x-pda” },{ “.pdb”, “chemical/x-pdb” },{ “.pdf”, “application/pdf” },{ “.pfr”, “application/font-tdpfr” },{ “.pfx”, “application/x-pkcs12” },{ “.pgm”, “image/x-portable-graymap” },{ “.pict”, “image/x-pict” },{ “.pko”, “application/ynd.ms-pkipko” },{ “.pm”, “application/x-perl” },{ “.pma”, “application/x-perfmon” },{ “.pmc”, “application/x-perfmon” },{ “.pmd”, “application/x-pmd” },{ “.pml”, “application/x-perfmon” },{ “.pmr”, “application/x-perfmon” },{ “.pmw”, “application/x-perfmon” },{ “.png”, “image/png” },{ “.pnm”, “image/x-portable-anymap” },{ “.pnz”, “image/png” },{ “.pot,”, “application/vnd.ms-powerpoint” },{ “.ppm”, “image/x-portable-pixmap” },{ “.pps”, “application/vnd.ms-powerpoint” },{ “.ppt”, “application/vnd.ms-powerpoint” },{ “.pptx”, “application/vnd.openxmlformats-officedocument.presentationml.presentation” },{ “.pqf”, “application/x-cprplayer” },{ “.pqi”, “application/cprplayer” },{ “.prc”, “application/x-prc” },{ “.prf”, “application/pics-rules” },{ “.prop”, “text/plain” },{ “.proxy”, “application/x-ns-proxy-autoconfig” },{ “.ps”, “application/postscript” },{ “.ptlk”, “application/listenup” },{ “.pub”, “application/x-mspublisher” },{ “.pvx”, “video/x-pv-pvx” },{ “.qcp”, “audio/vnd.qcelp” },{ “.qt”, “video/quicktime” },{ “.qti”, “image/x-quicktime” },{ “.qtif”, “image/x-quicktime” },{ “.r3t”, “text/vnd.rn-realtext3d” },{ “.ra”, “audio/x-pn-realaudio” },{ “.ram”, “audio/x-pn-realaudio” },{ “.rar”, “application/octet-stream” },{ “.ras”, “image/x-cmu-raster” },{ “.rc”, “text/plain” },{ “.rdf”, “application/rdf+xml” },{ “.rf”, “image/vnd.rn-realflash” },{ “.rgb”, “image/x-rgb” },{ “.rlf”, “application/x-richlink” },{ “.rm”, “audio/x-pn-realaudio” },{ “.rmf”, “audio/x-rmf” },{ “.rmi”, “audio/mid” },{ “.rmm”, “audio/x-pn-realaudio” },{ “.rmvb”, “audio/x-pn-realaudio” },{ “.rnx”, “application/vnd.rn-realplayer” },{ “.roff”, “application/x-troff” },{ “.rp”, “image/vnd.rn-realpix” },{ “.rpm”, “audio/x-pn-realaudio-plugin” },{ “.rt”, “text/vnd.rn-realtext” },{ “.rte”, “x-lml/x-gps” },{ “.rtf”, “application/rtf” },{ “.rtg”, “application/metastream” },{ “.rtx”, “text/richtext” },{ “.rv”, “video/vnd.rn-realvideo” },{ “.rwc”, “application/x-rogerwilco” },{ “.s3m”, “audio/x-mod” },{ “.s3z”, “audio/x-mod” },{ “.sca”, “application/x-supercard” },{ “.scd”, “application/x-msschedule” },{ “.sct”, “text/scriptlet” },{ “.sdf”, “application/e-score” },{ “.sea”, “application/x-stuffit” },{ “.setpay”, “application/set-payment-initiation” },{ “.setreg”, “application/set-registration-initiation” },{ “.sgm”, “text/x-sgml” },{ “.sgml”, “text/x-sgml” },{ “.sh”, “application/x-sh” },{ “.shar”, “application/x-shar” },{ “.shtml”, “magnus-internal/parsed-html” },{ “.shw”, “application/presentations” },{ “.si6”, “image/si6” },{ “.si7”, “image/vnd.stiwap.sis” },{ “.si9”, “image/vnd.lgtwap.sis” },{ “.sis”, “application/vnd.symbian.install” },{ “.sit”, “application/x-stuffit” },{ “.skd”, “application/x-Koan” },{ “.skm”, “application/x-Koan” },{ “.skp”, “application/x-Koan” },{ “.skt”, “application/x-Koan” },{ “.slc”, “application/x-salsa” },{ “.smd”, “audio/x-smd” },{ “.smi”, “application/smil” },{ “.smil”, “application/smil” },{ “.smp”, “application/studiom” },{ “.smz”, “audio/x-smd” },{ “.snd”, “audio/basic” },{ “.spc”, “application/x-pkcs7-certificates” },{ “.spl”, “application/futuresplash” },{ “.spr”, “application/x-sprite” },{ “.sprite”, “application/x-sprite” },{ “.sdp”, “application/sdp” },{ “.spt”, “application/x-spt” },{ “.src”, “application/x-wais-source” },{ “.sst”, “application/vnd.ms-pkicertstore” },{ “.stk”, “application/hyperstudio” },{ “.stl”, “application/vnd.ms-pkistl” },{ “.stm”, “text/html” },{ “.svg”, “image/svg+xml” },{ “.sv4cpio”, “application/x-sv4cpio” },{ “.sv4crc”, “application/x-sv4crc” },{ “.svf”, “image/vnd” },{ “.svg”, “image/svg+xml” },{ “.svh”, “image/svh” },{ “.svr”, “x-world/x-svr” },{ “.swf”, “application/x-shockwave-flash” },{ “.swfl”, “application/x-shockwave-flash” },{ “.t”, “application/x-troff” },{ “.tad”, “application/octet-stream” },{ “.talk”, “text/x-speech” },{ “.tar”, “application/x-tar” },{ “.taz”, “application/x-tar” },{ “.tbp”, “application/x-timbuktu” },{ “.tbt”, “application/x-timbuktu” },{ “.tcl”, “application/x-tcl” },{ “.tex”, “application/x-tex” },{ “.texi”, “application/x-texinfo” },{ “.texinfo”, “application/x-texinfo” },{ “.tgz”, “application/x-compressed” },{ “.thm”, “application/vnd.eri.thm” },{ “.tif”, “image/tiff” },{ “.tiff”, “image/tiff” },{ “.tki”, “application/x-tkined” },{ “.tkined”, “application/x-tkined” },{ “.toc”, “application/toc” },{ “.toy”, “image/toy” },{ “.tr”, “application/x-troff” },{ “.trk”, “x-lml/x-gps” },{ “.trm”, “application/x-msterminal” },{ “.tsi”, “audio/tsplayer” },{ “.tsp”, “application/dsptype” },{ “.tsv”, “text/tab-separated-values” },{ “.ttf”, “application/octet-stream” },{ “.ttz”, “application/t-time” },{ “.txt”, “text/plain” },{ “.uls”, “text/iuls” },{ “.ult”, “audio/x-mod” },{ “.ustar”, “application/x-ustar” },{ “.uu”, “application/x-uuencode” },{ “.uue”, “application/x-uuencode” },{ “.vcd”, “application/x-cdlink” },{ “.vcf”, “text/x-vcard” },{ “.vdo”, “video/vdo” },{ “.vib”, “audio/vib” },{ “.viv”, “video/vivo” },{ “.vivo”, “video/vivo” },{ “.vmd”, “application/vocaltec-media-desc” },{ “.vmf”, “application/vocaltec-media-file” },{ “.vmi”, “application/x-dreamcast-vms-info” },{ “.vms”, “application/x-dreamcast-vms” },{ “.vox”, “audio/voxware” },{ “.vqe”, “audio/x-twinvq-plugin” },{ “.vqf”, “audio/x-twinvq” },{ “.vql”, “audio/x-twinvq” },{ “.vre”, “x-world/x-vream” },{ “.vrml”, “x-world/x-vrml” },{ “.vrt”, “x-world/x-vrt” },{ “.vrw”, “x-world/x-vream” },{ “.vts”, “workbook/formulaone” },{ “.wav”, “audio/x-wav” },{ “.wax”, “audio/x-ms-wax” },{ “.wbmp”, “image/vnd.wap.wbmp” },{ “.wcm”, “application/vnd.ms-works” },{ “.wdb”, “application/vnd.ms-works” },{ “.web”, “application/vnd.xara” },{ “.wi”, “image/wavelet” },{ “.wis”, “application/x-InstallShield” },{ “.wks”, “application/vnd.ms-works” },{ “.wm”, “video/x-ms-wm” },{ “.wma”, “audio/x-ms-wma” },{ “.wmd”, “application/x-ms-wmd” },{ “.wmf”, “application/x-msmetafile” },{ “.wml”, “text/vnd.wap.wml” },{ “.wmlc”, “application/vnd.wap.wmlc” },{ “.wmls”, “text/vnd.wap.wmlscript” },{ “.wmlsc”, “application/vnd.wap.wmlscriptc” },{ “.wmlscript”, “text/vnd.wap.wmlscript” },{ “.wmv”, “audio/x-ms-wmv” },{ “.wmx”, “video/x-ms-wmx” },{ “.wmz”, “application/x-ms-wmz” },{ “.wpng”, “image/x-up-wpng” },{ “.wps”, “application/vnd.ms-works” },{ “.wpt”, “x-lml/x-gps” },{ “.wri”, “application/x-mswrite” },{ “.wrl”, “x-world/x-vrml” },{ “.wrz”, “x-world/x-vrml” },{ “.ws”, “text/vnd.wap.wmlscript” },{ “.wsc”, “application/vnd.wap.wmlscriptc” },{ “.wv”, “video/wavelet” },{ “.wvx”, “video/x-ms-wvx” },{ “.wxl”, “application/x-wxl” },{ “.x-gzip”, “application/x-gzip” },{ “.xaf”, “x-world/x-vrml” },{ “.xar”, “application/vnd.xara” },{ “.xbm”, “image/x-xbitmap” },{ “.xdm”, “application/x-xdma” },{ “.xdma”, “application/x-xdma” },{ “.xdw”, “application/vnd.fujixerox.docuworks” },{ “.xht”, “application/xhtml+xml” },{ “.xhtm”, “application/xhtml+xml” },{ “.xhtml”, “application/xhtml+xml” },{ “.xla”, “application/vnd.ms-excel” },{ “.xlc”, “application/vnd.ms-excel” },{ “.xll”, “application/x-excel” },{ “.xlm”, “application/vnd.ms-excel” },{ “.xls”, “application/vnd.ms-excel” },{ “.xlsx”, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” },{ “.xlt”, “application/vnd.ms-excel” },{ “.xlw”, “application/vnd.ms-excel” },{ “.xm”, “audio/x-mod” },{“.xml”,”text/plain”},{“.xml”,”application/xml”},[1]{ “.xmz”, “audio/x-mod” },{ “.xof”, “x-world/x-vrml” },{ “.xpi”, “application/x-xpinstall” },{ “.xpm”, “image/x-xpixmap” },{ “.xsit”, “text/xml” },{ “.xsl”, “text/xml” },{ “.xul”, “text/xul” },{ “.xwd”, “image/x-xwindowdump” },{ “.xyz”, “chemical/x-pdb” },{ “.yz1”, “application/x-yz1” },{ “.z”, “application/x-compress” },{ “.zac”, “application/x-zaurus-zac” },{ “.zip”, “application/zip” },{ “.json”, “application/json” },    

2019-12-01 23:22:17 0 浏览量 回答数 0
阿里云大学 云服务器ECS com域名 网站域名whois查询 开发者平台 小程序定制 小程序开发 国内短信套餐包 开发者技术与产品 云数据库 图像识别 开发者问答 阿里云建站 阿里云备案 云市场 万网 阿里云帮助文档 免费套餐 开发者工具 云栖号物联网 小程序开发制作 视频内容分析 企业网站制作 视频集锦 代理记账服务 2020阿里巴巴研发效能峰会 企业建站模板 云效成长地图 高端建站 云栖号弹性计算 阿里云云栖号 云栖号案例 云栖号直播