Web 编程语言的常见文件扩展名有哪些?
不同语言最常使用哪些文件扩展名?请不要输入源文件名(如 .java),而是输入呈现页面 URL 中的扩展名。
这是我到目前为止的(按字母顺序排列的)列表
- ASP Classic
- asp
- ASP.NET
- aspx
- axd
- asx
- asmx
- ashx
- CSS
- css
- Coldfusion
- cfm
- Erlang
- yaws
- Flash
- swf
- HTML
- html
- htm
- xhtml
- jhtml
- Java
- jsp
- jspx
- wss
- do
- action
- JavaScript
- js
- Perl
- pl
- PHP
- php
- php4
- php3
- phtml
- Python
- py
- Ruby
- rb
- rhtml
- SSI
- shtml
- TS
- XML
- xml
- rss
- svg
- 其他(C、perl 等)
- cgi
- dll
还有吗?我会根据评论不断更新。最大的正确添加(或删除)是可接受的答案。
旁白:这是为了比较在线语言使用:http:// blog.paulisageek.com/2009/10/file-extensions-on-internet.html
What file extensions are used most commonly by different languages? Please don't put source file names (like .java) but rather extensions that would be present in a URL for rendered pages.
Here is my (alphabetized) list so far
- ASP Classic
- asp
- ASP.NET
- aspx
- axd
- asx
- asmx
- ashx
- CSS
- css
- Coldfusion
- cfm
- Erlang
- yaws
- Flash
- swf
- HTML
- html
- htm
- xhtml
- jhtml
- Java
- jsp
- jspx
- wss
- do
- action
- JavaScript
- js
- Perl
- pl
- PHP
- php
- php4
- php3
- phtml
- Python
- py
- Ruby
- rb
- rhtml
- SSI
- shtml
- TS
- XML
- xml
- rss
- svg
- Other (C, perl etc.)
- cgi
- dll
Any more? I'll keep updating this based on comments. Largest correct additions (or deletions) is the accepted answer.
Aside: This is for comparing language use online: http://blog.paulisageek.com/2009/10/file-extensions-on-internet.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(19)
请记住,良好的 URL 设计将完全隐藏任何底层文件类型。
Keep in mind that good URL design will completely hide any underlying file types.
我创建了一个 Github gist,其中包含编程语言及其扩展的列表,以下是 gist 文件中包含的数据的子集:
我希望它有所帮助。
语言.json。
I have created a Github gist that contains a list of programming languages and their extensions, here is a subset of the data included in the gist file:
I hope it is helpful.
languages.json.
.action
— struts2.do
— struts1.xml
— XML.rss
— RSS 提要.atom
— Atom 提要 (RSS)(无扩展名) — 现在使用来增加 URL 的可读性,请检查 stackoverflow URL
.action
— struts2.do
— struts1.xml
— XML.rss
— RSS feeds.atom
— Atom feeds(RSS)(no extension) -- used now a days to increase readability of the URL, check stackoverflow URL
Ruby 过去也倾向于使用 .rhtml。
Stellent 使用 .hcsp 扩展名作为其页面模板。
我相信 Django 使用 .dtl。
Ruby also tended to use .rhtml in the past.
Stellent uses the .hcsp extension for its page templates.
I believe Django uses .dtl.
.yaws
(Erlang Yaws Web 服务器).yaws
(Erlang Yaws Web Server)这是您忘记的扩展名:
.adp
— AOLServer 使用 TCLHere is an extension you forgot:
.adp
— AOLServer using TCLRuby on Rails 还在内部使用以下模板(主要是 HTML 或 JavaScript 的文件)。因此,它们并不是真正面向公众的,并且对最终用户/机器人是透明的。
.html.erb
.erb
.rjs
曾经是最CGI 脚本是用 Perl 编写的。
Ruby on Rails also uses the following internally for templates (files that are mostly HTML or JavaScript). So they're not really public facing, and are transparent to the end user/robot.
.html.erb
.erb
.rjs
Used to be that most CGI scripts were written in Perl.
IE 特有的奇怪之处:
.hta
— html 应用程序.htc
— html 组件,允许您在运行时从您的网站更改 IE 行为!还有 XML:
.svg
— 它不仅仅是一种图像格式!IE specific strangeness:
.hta
— html application.htc
— html components, allows you to alter IE behavior at runtime, from you website!Also XML:
.svg
— it's not just an image format!.js
、.html
、.htm
、.xhtml
可能值得点头。.js
,.html
,.htm
,.xhtml
probably deserve a nod.-SSI(服务器端包含),使用扩展名
.shtml
-SSI (Server Side Includes), use the extension
.shtml
在那里添加:
.aspx
Add there:
.aspx
.asp
.css
.aspx
.asp
.css
REBOL 倾向于使用 .r,
但 .cgi 也被一些人用于 REBOL CGI 脚本。
REBOL tends to use .r
But .cgi is also used by some for REBOL CGI scripts.
ASP.NET 还需要更多,但我不确定这是否详尽:
ASP.NET needs a couple more, but I'm not sure this is exhaustive:
以下是一些 CSS 方言的一些常用(但很少强制执行)的扩展:
.hss
for hss 样式表.sass
for sass 样式表.less
用于 less css 样式表.ccss
或 < code>.pcss 用于聪明的CSS样式表Here's a few of the commonly-used (but rarely enforced) extensions for some CSS dialects:
.hss
for hss style sheets.sass
for sass style sheets.less
for less css style sheets.ccss
or.pcss
for clever css style sheets走老派:.cgi
通常用 C 或 Perl 编写
Going old school: .cgi
Typically written in C or Perl
.java .cs 和 .i_am_kidding_i_read_the_question。
严重的是,
swf
(Flash) 通常会被加载它们的 JS 隐藏,但它们通常是客户端看到的扩展。这是一种极限情况,因为它不像 JPEG(不允许 Web 编程),也不像 Javascript。但是,PHP/ASP/JSP 也不是,因为从客户端来看,它只是标记:).java .cs and .i_am_kidding_i_read_the_question.
On the serious side,
swf
(Flash) get hidden by the JS that loads them, generally, but they are extensions usually seen by the client. This is a limit case because it's not like JPEG (doesn't allow for web programming) nor like Javascript. But then, neither is PHP/ASP/JSP because from the client side it's just markup :).json
作为数据传输格式变得流行.png
.jpg
.gif
是最常见的图形,但还有其他的。还有视频扩展
.json
has become popular as a data xfer format.png
.jpg
.gif
are the most common graphics, but there are others.Also video extensions