易截截图软件、单文件、免安装、纯绿色、仅160KB

asp 截取文件扩展名

我有一个文件名  aaa.bbb.rar或者a.b.c.d.html或者aa.b.dd.shtml
我怎样截取文件的后缀名呀。。。
<%
aa="aaa.bbb.rar"
bb=split(aa,".")
response.write bb(ubound(bb))
%>

修改一下楼上的代码。
VBScript code:
<%
aa="aaa.bbb.rar"
bb=split(aa,".")
if ubound(bb)=0 then
response.write ""
else
response.write trim(bb(ubound(bb)))
end if
%>


s = "F:\aaa\xxx.aaa.txt"
Response.Write("文件名: " & Mid(s, InStrRev(s, "\") + 1, Len(s) - InStrRev(s, "\")))
Response.Write("文件后缀: " & Mid(s, InStrRev(s, ".") + 1, Len(s) - InStrRev(s, ".")))

http://www.bhcode.net/article/20080721/1820.html

path="aaa.bbb.rar"
kzname=split(path,".")(ubound(split(path,".")))

VBScript code:
path="aaa.bbb.rar"
kzname=split(path,".")(ubound(split(path,".")))



相关问答:

asp中用javascript动态改变Image的src的路径问题

<form id="form1" runat="server">
  <div>
  <script type="text/javascript">
  function oo(a){
  document.getEleme ......

ASP伪静态的另类问题

由于对页面使用了伪静态
并且对ID进行了加密。
主要代码如下:
httpd.ini
RewriteRule /List-([0-9,a-z]*).html /List.asp\?ComId=$1 [N,I]

程序代码
A为加密,B为解密函数
<a href=&q ......

ASP降序问题

    <%
  Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16)"
Rs.Open Sql, conn, 1,1
Do Until Rs.Eof ......

asp伪静态 - Web 开发 / ASP

我找了一个伪静态代码,如下:
index.asp
<!--#include file="config.asp"-->  
<ol>  
<%  
Set rs=server.CreateObject("adodb.recordset") & ......

asp删除字符串的问题

<a href=http://www.baidu.com>百度 </a> <!--这里的内容不想要了--> <a href=http://www.g.cn>google </a> <!--这里的内容不想要了--> <a href=http://www.sogou.com>s ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号